summaryrefslogtreecommitdiffstats
path: root/src/gui/ControlPanel.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/ControlPanel.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/ControlPanel.cpp')
-rw-r--r--src/gui/ControlPanel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp
index e393b7ca..bcbc0824 100644
--- a/src/gui/ControlPanel.cpp
+++ b/src/gui/ControlPanel.cpp
@@ -16,6 +16,7 @@
*/
#include "interface/EngineInterface.hpp"
+#include "shared/LV2URIMap.hpp"
#include "client/NodeModel.hpp"
#include "client/PortModel.hpp"
#include "client/PluginModel.hpp"
@@ -185,7 +186,9 @@ ControlPanel::value_changed_atom(SharedPtr<PortModel> port, const Raul::Atom& va
{
if (_callback_enabled) {
if (_all_voices_radio->get_active()) {
- App::instance().engine()->set_property(port->path(), "ingen:value", val);
+ App::instance().engine()->set_property(port->path(),
+ App::instance().uris().ingen_value,
+ val);
port->value(val);
} else {
int voice = _voice_spinbutton->get_value_as_int();
@@ -213,7 +216,7 @@ ControlPanel::specific_voice_selected()
void
ControlPanel::parent_property_changed(const Raul::URI& predicate, const Raul::Atom& value)
{
- if (predicate.str() == "ingen:polyphony" && value.type() == Atom::INT)
+ if (predicate == App::instance().uris().ingen_polyphony && value.type() == Atom::INT)
_voice_spinbutton->set_range(0, value.get_int32() - 1);
}
@@ -221,7 +224,7 @@ ControlPanel::parent_property_changed(const Raul::URI& predicate, const Raul::At
void
ControlPanel::variable_changed(const Raul::URI& predicate, const Raul::Atom& value)
{
- if (predicate.str() == "ingen:polyphonic" && value.type() == Atom::BOOL) {
+ if (predicate == App::instance().uris().ingen_polyphony && value.type() == Atom::BOOL) {
if (value.get_bool())
_voice_control_box->show();
else