estanglerbm opened a new pull request #1031: URL: https://github.com/apache/royale-asjs/pull/1031
Fixed scroll handler (under async scroll events) and optimize current implementation of MX ADG, especially with regard to header renderers. The "deferred" logic for the scroll handler in ADG (in MX DataGridLayout) wasn't quite right, and under async scroll events in more recent browsers, it fired too often. More room for improvement, but should be better. **Even with the following ADG optimizations, scrolling is still not as smooth as it should be.** In fact, with the way the scroll event is hooked, it really doesn't tolerate much rendering time. Now, in release mode, it may be barely acceptable for grids with more than a few columns and rows. Removed things and cached things in ADG header renderers to optimize. They need more refactoring to be more Royale-like, but this is some progress (and is a lot faster). Note that to work around very slow getStyle(), some header styles are not as dynamic. Some simple optimization (fetch positioner into variable) in a few UIBase methods (x, y, setX, setY) to reduce the number of function calls (even though function calls are cheap in JS, these are high-impact methods). Added override of validateDisplayList() to AdvancedDataGridHeaderRenderer so that AdvancedDataGridHeaderLayout had a way to call AdvancedDataGridHeaderRenderer.updateDisplayList() [which is protected]. Previously, it was being called through setWidth(), but that's the wrong place and even more expensive. Moved the scrollTop workaround (for whatever Chrome bug) to after the loop, for DOM performance. Did some naughty style caching (through the owner grid) in AdvancedDataGridSelectableItemRendererBead so that the first load of cached styles can be shared among the beads over all the renderers, for performance. Hopefully that can be rewritten with faster stuff in a normal way later. [Did it this way because I can't find a good place to push the styles from the owner grid to each bead as it gets added.] ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
