Mailspring/internal_packages/search-index/lib
Mark Hahnenberg 781080716c [search-index] Throttle search indexing
Summary:
This diff adds a new SearchIndexer class that each of the concrete
indexer implementations register with. This new class uses the
`isSearchIndexed` field in searchable classes to split indexing work
into chunks. It then times how long it takes to index each chunk and
schedules more work based on a target CPU percent. For example, if it
takes 150 ms to index the last chunk of work and the target CPU fraction
is 0.05 (i.e. 5% CPU use) then it will schedule the next increment of
indexing 3 seconds in the future.

Test Plan: Run locally, verify that indexing occurs in increments

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3707
2017-01-16 10:32:45 -08:00
..
contact-search-indexer.es6 feat(event-search): Add event search to calendar 2016-11-15 17:27:31 -08:00
event-search-indexer.es6 feat(event-search): Add event search to calendar 2016-11-15 17:27:31 -08:00
main.es6 [search-index] Throttle search indexing 2017-01-16 10:32:45 -08:00
search-indexer.es6 [search-index] Throttle search indexing 2017-01-16 10:32:45 -08:00
thread-search-index-store.es6 [search-index] Throttle search indexing 2017-01-16 10:32:45 -08:00