comparison .hgsigs @ 27106:6ef17697b03d

ui: track label expansion when creating buffers As part of profiling `hg log` performance, I noticed a lot of time is spent in buffered writes to ui instances. This patch starts a series that refactors buffered writes with the eventual intent to improve performance. Currently, labels are expanded when buffers are popped. This means we have to preserve the original text and the label until we render the final output. This is avoidable overhead and adds complexity since we're retaining state. This patch adds functionality to ui.pushbuffer() to declare whether label expansion should be active for the buffer. Labels are still evaluated during buffer pop. This will change in a subsequent patch. Since we'll need to access the "expand labels" flag on future write() operations, we prematurely optimize how the current value is stored to optimize for rapid retrieval.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 22 Nov 2015 14:10:48 -0800
parents a45821a808ab
children 7e1fac6c0a9c
comparison
equal deleted inserted replaced
27101:61fbf5dc12b2 27106:6ef17697b03d