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

Why is library making network requests? #124

Open
erfanmola opened this issue Oct 19, 2024 · 1 comment
Open

Why is library making network requests? #124

erfanmola opened this issue Oct 19, 2024 · 1 comment

Comments

@erfanmola
Copy link

I have noticed that library is fetching the file below:
https://unpkg.com/[email protected]/dist/benchmarks/m-apple-ipad.json

Is there any specific reason for this? the file contains the models and etc, I understand, but is it neccessery if I only need "Tier"? Is there any way to disable this behaviour and make it work completely offline without external requests?

@wesbos
Copy link

wesbos commented Oct 23, 2024

It would be too much to load all that data on every page - so it only loads the data needed.

As I understand it, the FPS values are stored in these files, so you need that get the tier: https://github.com/pmndrs/detect-gpu/blob/master/src/index.ts#L220

You can host it yourself and pass in the URL

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

No branches or pull requests

2 participants