mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-12 11:08:10 +08:00
e924e74c1b
Summary: We were seeing JS blocking in snippet extraction of up to 2k ms. This is because we were walking the entire DOM of a message and extracting all text, regardless of message size---and using our own homegrown DOM walker function. To remedy this, use the standard TreeWalker from the Chrome browser APIs (which in benchmarks looks 2-4x faster) and also exit out of the DOM walking process once we've accumulated enough text to create a snippet. Informal eyeballing of timing metrics for this function suggests the new implementation is something like 10-100x faster for some messages. As a bonus, we get to delete some code and end up with a cleaner implementation! Test Plan: old unit tests yaay Reviewers: juan Reviewed By: juan Subscribers: evan Differential Revision: https://phab.nylas.com/D3543 |
||
---|---|---|
.. | ||
images | ||
spec | ||
src | ||
stylesheets | ||
main.es6 | ||
package.json |