-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
less blindly pre-populate charts data
This makes the pre-population of charts data smarter by avoiding duplicate or simultaneous queries, and by avoiding it during explorerUI construction.1 Do not pre-populate in explorer.New. Wait for initial Store. Give chartDataCounter a Height and Update function. Height returns -1 when data has never been assigned. In prePopulateChartsData, return without update if cache is at same height as the explorerUI (as determined by .pageData.BlockInfo.Height via (*explorerUI).Height). In (*explorerUI).Store, only run prePopulateChartsData AFTER storing the new BlockInfo in pageData. Avoid launching two identical queries by holding the cache locked when when performing both the height check and update in prePopulateChartsData. Add thread-unsafe height and update functions for chartDataCounter so that the cache can be locked for both operations manually.
- Loading branch information
Showing
1 changed file
with
64 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters