In Universal Logging, class LogDecorations keeps resolved decorations as well as a lookup table of pointers to the start of each resolved decoration, by decorator. This is dangerous, since it makes object copy non-trivial (the pointers would need to be relocated). It is also wasteful since we spend 8 bytes per pointer per index.
Better would be to use a numerical index array of offset values, which could be safely copied. And since the resolve buffer is 256 char, we can easily make this index an 8-bit value, which would reduce the size of a LogDecorations object from 368 down to 280 bytes (which matters e.g. forJDK-8229517)
Better would be to use a numerical index array of offset values, which could be safely copied. And since the resolve buffer is 256 char, we can easily make this index an 8-bit value, which would reduce the size of a LogDecorations object from 368 down to 280 bytes (which matters e.g. for