diff options
author | Piotr Jastrzebski <haaawk@google.com> | 2015-03-04 19:14:48 +0000 |
---|---|---|
committer | Piotr Jastrzebski <haaawk@google.com> | 2015-03-23 16:10:41 +0000 |
commit | 83b7be6b15e433f8594bb62dd1dc5115300709f3 (patch) | |
tree | e70a992a5ee0921594d8f5a456c1bc64213265f6 /antlr-runtime/antlr-3.4 | |
parent | 9ecf4b02965abc736a1fa94c1cb11e564c45717b (diff) | |
download | toolchain_jack-83b7be6b15e433f8594bb62dd1dc5115300709f3.zip toolchain_jack-83b7be6b15e433f8594bb62dd1dc5115300709f3.tar.gz toolchain_jack-83b7be6b15e433f8594bb62dd1dc5115300709f3.tar.bz2 |
Optimize VPathFragment creation.
When compiling Music app we create 207k instances of VPathFragment.
83k of them are created in VPath.appendPath and VPath.prependPath.
Those instances are the same so this change introduces a new static
field to VPath which will keep a singleton for all those invocations.
The remaining 124k instances are created in VPath constructor and have
the same separator (INTERNAL_SEPARATOR). This change introduces a new
subclass of VPathFragment to handle separators different than
INTERNAL_SEPARATOR. VPathFragment itself assumes INTERNAL_SEPARATOR is
used. This way we make those 124k objects smaller and save on GC.
Change-Id: Ic69c6c2bcf72473ea71a2d7d0adc1bfb5dc5bbd7
Diffstat (limited to 'antlr-runtime/antlr-3.4')
0 files changed, 0 insertions, 0 deletions