From a645d2b8be4d7d31f6eef1649156b166a01e0c31 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 2 Feb 2010 20:37:50 +0000 Subject: Use Glib string interning (quarks) to make Path/URI operator== very fast. This avoids a ton of string comparison overhead in Ingen when setting various properties (e.g. "ingen:value" was compared several times every time a port value was changed, now this is just a single pointer comparison and the full round trip of a value change does no string comparison at all, but is still property based and RDFey). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2408 a436a847-0d15-0410-975c-d299462d15a1 --- src/module/ingen_module.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/module/ingen_module.cpp') diff --git a/src/module/ingen_module.cpp b/src/module/ingen_module.cpp index 5faefebc..167fd0f2 100644 --- a/src/module/ingen_module.cpp +++ b/src/module/ingen_module.cpp @@ -16,10 +16,12 @@ */ #include "redlandmm/World.hpp" +#include "uri-map.lv2/uri-map.h" +#include "ingen-config.h" #include "shared/LV2Features.hpp" +#include "shared/LV2URIMap.hpp" #include "ingen_module.hpp" #include "World.hpp" -#include "ingen-config.h" #ifdef HAVE_SLV2 #include "slv2/slv2.h" #endif @@ -39,7 +41,12 @@ ingen_get_world() #ifdef HAVE_SLV2 world->slv2_world = slv2_world_new_using_rdf_world(world->rdf_world->world()); world->lv2_features = new Ingen::Shared::LV2Features(); + world->uris = PtrCast( + world->lv2_features->feature(LV2_URI_MAP_URI)); slv2_world_load_all(world->slv2_world); +#else + world->uris = SharedPtr( + new Ingen::Shared::LV2URIMap()); #endif world->engine.reset(); world->local_engine.reset(); -- cgit v1.2.1