This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Do not process partial tiles if no new resources have arrived - #1461
Merged
Merged
Conversation
Contributor
Author
|
@kkaefer @jfirebaugh please review |
tmpsantos
force-pushed
the
1458-partial_tiles_reparse
branch
from
May 7, 2015 18:11
91d2a63 to
9d6698b
Compare
tmpsantos
force-pushed
the
1458-partial_tiles_reparse
branch
3 times, most recently
from
May 12, 2015 07:41
93b9e28 to
67025d7
Compare
tmpsantos
force-pushed
the
1458-partial_tiles_reparse
branch
from
May 15, 2015 09:52
67025d7 to
5b86c57
Compare
For now, keep a pointer so we can subscribe/unsubscribe to events. In the future, we should move this object completely to ResourceLoader, but we can't do it now because we delete the ResourceLoader when changing the style.
We were previously emitting the signal on the thread parsing the glyph, but signals can only be trigger from the MapThread because the observers are living there.
Partial tiles are now only processed again when there is a new resource available. If we don't have new resources - like new glyphs - the end result of the reparsing is the same, because no new SymbolBuckets would are created. In my tests debugging with PowerTOP, this patch drops the CPU utilization during the sampling period from 100ms/s to 40ms/s. The improvements on slow connections (i.e. more time waiting for resources) are even more noticeable.
When parsing a tile, we request resources from the network, like sprites and glyphs. In the rare case of the resources arriving before the tile is parsed for the first time, if we don't mark it for being parsed again, it can end up with a tile eternally stuck in the partial state.
We only emit signals when the number of buckets increase (i.e. the new data that arrived added a new bucket to the tile). Also, if we try to reparse a partial tile but it is not possible, we keep the flag up for trying to reparse it again on the next update, because the data might have arrived after the bucket that is waiting for the data was processed but before the end of the parsing. Fixes #1458
tmpsantos
force-pushed
the
1458-partial_tiles_reparse
branch
from
May 18, 2015 08:08
5b86c57 to
aaaf1e4
Compare
tmpsantos
added a commit
that referenced
this pull request
May 18, 2015
Do not process partial tiles if no new resources have arrived
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partial tiles are now only processed again when there is a new resource available. If we don't have new resources - like new glyphs - the end result of the reparsing is the same, because no new SymbolBuckets would are created.
In my tests debugging with PowerTOP, this patch drops the CPU utilization during the sampling period from 100ms/s to 40ms/s. The improvements on slow connections (i.e. more time waiting for resources) are even more noticeable.
Fixes #1458