Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More precise and adaptive JSON parsing speed prediction #750

Open
atteneder opened this issue Jan 15, 2025 · 0 comments
Open

More precise and adaptive JSON parsing speed prediction #750

atteneder opened this issue Jan 15, 2025 · 0 comments
Labels
enhancement New feature or request import Import of glTF files performance
Milestone

Comments

@atteneder
Copy link
Owner

atteneder commented Jan 15, 2025

In order to avoid frame stalls, glTFast predicts the time it takes to parse the glTF JSON and depending on that it parses on the main thread directly or moves it to a worker thread.

This prediction is based on a throughput measurement taken years ago (so with different JSON parsing code) on on particular machine (the representation for all cases is questionable).

While running performance tests I observed major frame stalls because the expected parsing time was totally underestimated (on the same machine the original measurements were taken).

We should:

  • Make better educated guesses pertaining to the expected speed (e.g. lower on mobile platforms).
  • Measure the actual speed and adjust the expected throughput. That should lead to better estimates on subsequent loads.
  • Override the estimation in GLTFast.Newtonsoft.GltfImport, as Newtonsoft JSON has different performance.
@atteneder atteneder added enhancement New feature or request import Import of glTF files performance labels Jan 15, 2025
@atteneder atteneder added this to the 6.x milestone Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request import Import of glTF files performance
Projects
Status: To do
Development

No branches or pull requests

1 participant