Memory efficiency with multiple Desmos calculators

45 views
Skip to first unread message

Ron George Pile

unread,
May 30, 2024, 3:32:51 PM5/30/24
to desmos-api-discuss
Hello,

I'm trying out Desmos API as my graph display tool. There will be multiple graphs in each section of the website and I'm also thinking of a feature where a user can add a graph dynamically into the page.

Is there a space-efficient way to do this? I've read the documentation to see if there's a way to clear old and unused graph objects from memory, but I've not found anything related. I saw a post on this Google Group that loading lots of separate calculators on one page is resource-intensive, but I'm not open to the suggestion of linking Desmos graphs to the Desmos website. I'd like to have everything in one place. Has anyone worked with many calculators in an efficient way?   Any help will be appreciated.

Thanks.
Sincerely,
Ron Pile

Ron George Pile

unread,
Jun 13, 2024, 10:15:26 AM6/13/24
to desmos-api-discuss
Any help here would be greatly appreciated.

--
You received this message because you are subscribed to a topic in the Google Groups "desmos-api-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/desmos-api-discuss/Wik3RFhNRd4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to desmos-api-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/desmos-api-discuss/bb73cd96-0f69-450b-b793-f677d7a03421n%40googlegroups.com.

Chris Lusto

unread,
Jun 13, 2024, 1:45:16 PM6/13/24
to Ron George Pile, desmos-api-discuss
Hi Ron,

The calculator has a destructor method. You can simply call `.destroy()` to clean up any resources from a calculator instance that you have removed from the DOM and want to be rid of.

Best,
Chris

You received this message because you are subscribed to the Google Groups "desmos-api-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to desmos-api-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/desmos-api-discuss/CAJkAuxNqevg%2BTvC1scptMV-UKhifu_QkstD_NePU%3DEt2ZXpcDQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages