summaryrefslogtreecommitdiffstats
path: root/src/gui/NodeMenu.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-02 20:37:50 +0000
committerDavid Robillard <d@drobilla.net>2010-02-02 20:37:50 +0000
commita645d2b8be4d7d31f6eef1649156b166a01e0c31 (patch)
tree3d83c08e9a5460cc6582482bcfc673dff956a1e7 /src/gui/NodeMenu.cpp
parent653679e967f11a0e008521885fcaf6994d2961fa (diff)
downloadingen-a645d2b8be4d7d31f6eef1649156b166a01e0c31.tar.gz
ingen-a645d2b8be4d7d31f6eef1649156b166a01e0c31.tar.bz2
ingen-a645d2b8be4d7d31f6eef1649156b166a01e0c31.zip
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
Diffstat (limited to 'src/gui/NodeMenu.cpp')
-rw-r--r--src/gui/NodeMenu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index c801d3e7..ae735ad6 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -17,6 +17,7 @@
#include <gtkmm.h>
#include "interface/EngineInterface.hpp"
+#include "shared/LV2URIMap.hpp"
#include "client/NodeModel.hpp"
#include "client/PluginModel.hpp"
#include "App.hpp"
@@ -145,7 +146,8 @@ NodeMenu::on_menu_randomize()
float min = 0.0f, max = 1.0f;
nm->port_value_range(*i, min, max);
const float val = ((rand() / (float)RAND_MAX) * (max - min) + min);
- App::instance().engine()->set_property((*i)->path(), "ingen:value", val);
+ App::instance().engine()->set_property((*i)->path(),
+ App::instance().uris().ingen_value, val);
}
}
@@ -178,7 +180,7 @@ NodeMenu::on_preset_activated(const std::string uri)
SLV2Value val = slv2_results_get_binding_value(values, 1);
App::instance().engine()->set_property(
node->path().base() + slv2_value_as_string(sym),
- "ingen:value",
+ App::instance().uris().ingen_value,
slv2_value_as_float(val));
}
App::instance().engine()->bundle_end();