This is a follow-up for bug 74056, for some performance improvements in special cases. dhyatt's comment on https://bugs.webkit.org/show_bug.cgi?id=74056 -- > Not going to minus for this but thought of a couple of optimizations if you don't mind following up: > > (1) If the oldIntrudingFloat set ever empties out, you can bail out of that last loop early. > > In other words: > > for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end && !oldIntrudingFloatSet.isEmpty(); ++it) > oldIntrudingFloatSet.remove((*it)->m_renderer); > > That way once the set gets emptied out, you don't waste time iterating over floats that you know won't be found in the set. > > (2) If you cached an intruding object count and kept it up to date, you could really optimize the avoidsFloats case, since all it did was checked for if you had any intruding floats at all. Then you could make that case O(1) instead of O(n). > > I won't minus, but I'd appreciate a follow-up bug and fixes for this.
Created attachment 136945 [details] Patch
Comment on attachment 136945 [details] Patch r=me
Comment on attachment 136945 [details] Patch Clearing flags on attachment: 136945 Committed r114190: <http://trac.webkit.org/changeset/114190>
All reviewed patches have been landed. Closing bug.