Status: Accepted
Owner:
johns...@google.comArea: SkSL
Priority: Low
Type: Idea
New issue 14635 by
johns...@google.com: SkSL: remove ModifiersPool
https://bugs.chromium.org/p/skia/issues/detail?id=14635Most places where modifiers are used do not actually require Layout, but some do need both (global variables, interface blocks, interface block fields).
Modifier flags are only 4 bytes (sizeof int), but Layout is 40 bytes. However, Modifiers and Layout currently share one struct; we can't have one without the other.
This was previously recognized as a waste of space, so Modifiers were pooled into a hash set. This reduced the cost of Modifiers to sizeof(pointer), still generally larger than sizeof(int).
It seems like a better design would be:
- Separate Modifiers and Layout so that they don't share a single struct
- Remove Layout from the places which don't use it. The only places which should need it are (I think) global variables, interface blocks and IB fields.
- Remove ModifiersPool
This seems like it would be an overall win--code size down, memory usage roughly flat, performance possibly up, get rid of the modifiers pool.
It would not be a huge savings but it reduces overall complexity.
--
You received this message because:
1. The project was configured to send all issue notifications to this address
You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings