Rename IDs and anchors to have shorter names
Inkscape SVG files have generated ID attributes and anchors in the form "linearGradient
The size could be reduced further by shortening these to names like "lg1", "s2", "sg3" and "p1" where possible.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
[Louis Simard]
I just did some work on this blueprint, but I decided to go the "shortest possible id name" route, like Java/CIL obfuscators.
Instead of lgNUMBER for linear gradients, rgNUMBER for radial gradients, etc., I just use 'a' to 'z' for the most-referenced items, and 'aa' to 'zz' (possibly 'aaa' to 'zzz', etc.) for the rest.
So a document with these IDs, referenced these numbers of times:
#linearGradient5419 = 55
#radialGradient5411 = 18
#linearGradient2096 = 16
...
#rect4491 = 2
#use3481 = 1
#use3484 = 1
#use3486 = 1
#use3494 = 1
Could become, after optimisation with this branch's code:
#a = 55
#b = 18
#c = 16
...
#z = 2
#aa = 1
#ab = 1
#ac = 1
#ad = 1