Allow pointer compare instead of string compare with keys, group and item
Bug #1283471 reported by
Daniel Schürmann
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
Confirmed
|
Low
|
Daniel Schürmann |
Bug Description
If we extend the Key Api in a way, that we have every group and key string only one time in memory, we could switch to pointer compare instead of string or hash compare at many places inside Mixxx. Or we can remove some workarounds, that where introduced in hot paths to avoid the string compare.
We can just rename the "const char* group" to "GroupHandle group" and introduce some conversion functions.
The parts are already in place
eg:
const char* LegacySkinParse
Changed in mixxx: | |
status: | New → Confirmed |
assignee: | nobody → Daniel Schürmann (daschuer) |
Changed in mixxx: | |
milestone: | 2.1.0 → none |
To post a comment you must log in.
Thanks for filing this but before spending any time on this bug please
first present data that this is a performance issue. I don't believe that
doing QMap lookups or string comparisons produce a measurable impact the
way we are using them. Of course we should not do them in a per-sample loop
but a per-group loop is likely fine. I'm happy to be proven otherwise but I
won't accept micro-optimization patches that make things more complicated
with no real benefit.
For sure, we should benchmark QList linear scans versus QMap and QHash
(based on the small number of groups we use the general wisdom is we should
be using QMap over QHash). The small number of groups may make the n^2
approach faster in practice than a more complicated constant time or log n
structure.
On Saturday, February 22, 2014 10:55:39 PM, Daniel Schürmann <
<email address hidden>> wrote:
Public bug reported:
If we extend the Key Api in a way, that we have every group and key
string only one time in memory, we could switch to pointer compare
instead of string or hash compare at many places inside Mixxx. Or we can
remove some workarounds, that where introduced in hot paths to avoid the
string compare.
We can just rename the "const char* group" to "GroupHandle group" and r::safeChannelS tring(QString channelStr);
introduce some conversion functions.
The parts are already in place
eg:
const char* LegacySkinParse
** Affects: mixxx
Importance: Undecided
Status: New
-- /bugs.launchpad .net/bugs/ 1283471
You received this bug notification because you are a member of Mixxx
Development Team, which is subscribed to Mixxx.
https:/
Title:
Allow pointer compare instead of string compare with keys, group and
item
To manage notifications about this bug go to: /bugs.launchpad .net/mixxx/ +bug/1283471/ +subscriptions
https:/