Testing performance enhancements by enabling transformations cache

Also reduce the utilization of dynamic cast.
This commit is contained in:
Felipe Zimmerle
2015-11-04 00:28:04 -03:00
parent e641c3cc17
commit 2ee5d4ca8f
12 changed files with 80 additions and 17 deletions

View File

@@ -14,6 +14,7 @@
*/
#include <string>
#include <unordered_map>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
@@ -28,6 +29,18 @@ class Assay;
namespace actions {
namespace transformations {
class UrlDecodeInstantCache : public std::unordered_map<std::string, std::string> {
public:
static UrlDecodeInstantCache& getInstance() {
static UrlDecodeInstantCache instance;
return instance;
}
private:
UrlDecodeInstantCache() {};
};
class UrlDecode : public Transformation {
public:
explicit UrlDecode(std::string action);