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/gui/PatchView.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gui/PatchView.cpp') diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp index 6fce3797..434d455c 100644 --- a/src/gui/PatchView.cpp +++ b/src/gui/PatchView.cpp @@ -19,6 +19,7 @@ #include #include "raul/log.hpp" #include "interface/EngineInterface.hpp" +#include "shared/LV2URIMap.hpp" #include "client/PatchModel.hpp" #include "App.hpp" #include "PatchView.hpp" @@ -187,7 +188,8 @@ PatchView::process_toggled() if (!_enable_signal) return; - App::instance().engine()->set_property(_patch->path(), "ingen:enabled", + App::instance().engine()->set_property(_patch->path(), + App::instance().uris().ingen_enabled, (bool)_process_but->get_active()); } @@ -195,7 +197,8 @@ PatchView::process_toggled() void PatchView::poly_changed() { - App::instance().engine()->set_property(_patch->meta().uri(), "ingen:polyphony", + App::instance().engine()->set_property(_patch->meta().uri(), + App::instance().uris().ingen_polyphony, _poly_spin->get_value_as_int()); } @@ -211,7 +214,7 @@ void PatchView::property_changed(const Raul::URI& predicate, const Raul::Atom& value) { _enable_signal = false; - if (predicate.str() == "ingen:enabled") { + if (predicate == App::instance().uris().ingen_enabled) { if (value.type() == Atom::BOOL) _process_but->set_active(value.get_bool()); else -- cgit v1.2.1