Skip to content
New issue

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

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

Already on GitHub? # to your account

Webgazer too slow #354

Open
Divyesh-Kamalanaban opened this issue Dec 30, 2024 · 5 comments
Open

Webgazer too slow #354

Divyesh-Kamalanaban opened this issue Dec 30, 2024 · 5 comments

Comments

@Divyesh-Kamalanaban
Copy link

As the title suggests, webgazer was very fast at first but now it has slowed down a bit. Maybe theres something buggy in my react code but honestly the integration was really quirky. Is there a memory leak or is it just my system? I would appreciate someone confirming this issue.

@Divyesh-Kamalanaban
Copy link
Author

image

A follow up to the above problem. Maybe this might be the issue? If there's a fix please let me know.

@jeffhuang
Copy link
Contributor

Would love if you could test it!

@Divyesh-Kamalanaban
Copy link
Author

I checked it with my resource monitor and task manager now, no sudden surges of memory consumption. And can also confirm my system is capable enough to run this script (i5-1240p, 16 GB of RAM, RTX 2050 with 4GB of VRAM). I tried testing the integration with vanilla JavaScript and it was fast enough. I expect the issue to be with something related to React and Webgazer. I am unable to use the npm method to import Webgazer so I'm using Script tag in HTML and using it in React JS using window.webgazer and useEffect hook. is there any issue with how I'm importing or any workarounds with using react?

@Divyesh-Kamalanaban
Copy link
Author

I found out the root cause of the problem. Local session storage was set to true, which messes up with the memory storage and stuff. The website runs better now but at the expense of recalibration every single time.

@jeffhuang
Copy link
Contributor

Are you using localForage in WebGAzer, or localStorage? localForage should not have the typically low memory limit (5 mb) that localStorage has. How long does it take before it slows down?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants