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

GLBRangeRequests: Avoid duplicated full content download #90

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

takahirox
Copy link
Owner

If server doesn't support range requests it responds with 200 status and full content for range requests. FileLoader raises an error if it receives 200 status for range requests.

Currently the plugin invokes glTFLoader.load(url) as fallback if detecting an error while loading json chunk. The fallback load(url) can cause full range request.

This commit avoid the duplicated full range content downloading by reusing the full content loaded by the first range request.

Probably duplicated full range content downloading may not be a big deal because browser's disk cache works. But just in case we want to avoid it even in JavaScript level.

If server doesn't support range requests it responds with
200 status and full content for range requests. FileLoader
raises an error if it receives 200 status for range
requests.

Currently the plugin invokes glTFLoader.load(url) as fallback
if detecting an error while loading json chunk. The fallback
load(url) can cause full range request.

This commit avoid the duplicated full range content
downloading by reusing the full content loaded by the
first range request.

Probably duplicated full range content downloading may not
be a big deal because browser's disk cache works. But just
in case we want to avoid it even in JavaScript level.
@takahirox takahirox merged commit 3824fd7 into main Oct 26, 2022
@takahirox takahirox deleted the GLBRangeRequestsReuseFullcontentBuffer branch October 26, 2022 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant