This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Use a designated thread for GeoJSONSource features conversion - #14375
Closed
LukasPaczos wants to merge 1 commit into
Closed
LukasPaczos wants to merge 1 commit into
LukasPaczos wants to merge 1 commit into
Conversation
Contributor
|
@LukasPaczos Attaching a thread to the JVM indeed forces a sync with the GC (which may or may not require the GC to run). Is it a possibility to handle the threading completely on the native side? And only communicate over the JNI boundary on the main UI thread? That way you could prevent re-attaching the thread all together without needing a thread-per-source setup. |
Contributor
Author
|
Closing in favor of #14450. |
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.
Refs #14048.
I've noticed, that constantly detaching and re-attaching threads to the JVM invokes GC. I don't quite understand why, but since we are allowing for only one async features conversion at a time and using a designated thread for the conversion removes a need of constantly attaching new threads from the pool, I think this is a beneficial change.
One downside here is, that now each
GeoJSONSourceinstance creates and holds a new thread. A solution might be creating a fixed pool of long-lived threads that are permanently attached to the JVM, and not rotated. Any thoughts on this @ivovandongen?