Merge lp://qastaging/~liampwhite/inkscape/spfactory-gperf into lp://qastaging/~inkscape.dev/inkscape/trunk
Proposed by
Liam P. White
Status: | Needs review |
---|---|
Proposed branch: | lp://qastaging/~liampwhite/inkscape/spfactory-gperf |
Merge into: | lp://qastaging/~inkscape.dev/inkscape/trunk |
Diff against target: |
1080 lines (+826/-215) 2 files modified
src/sp-factory.cpp (+466/-215) src/sp-factory.gperf (+360/-0) |
To merge this branch: | bzr merge lp://qastaging/~liampwhite/inkscape/spfactory-gperf |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Krzysztof Kosinski | Needs Fixing | ||
Review via email:
|
Description of the change
Converts SPFactory's strcmp chain to a constant-time hash table lookup.
Should improve loading performance by small amounts in complex documents.
To post a comment you must log in.
Unmerged revisions
- 14636. By Liam P. White
-
convert SPFactory to a gperf table
undo some earlier stupidity
I am skeptical about this.
1. Do we have any evidence that the strcmp chain is a performance problem?
2. At a minimum, this must be integrated with the build system, so that sp-factory.cpp is automatically rebuilt whenever sp-factory.gperf is modified.
3. I'd rather see something based on a trie initialized at runtime, since it would be more generally useful; for instance, we could reuse it for ID lookup.