Enabling Doenet coordinator script to save memory

18 views
Skip to first unread message

Duane Nykamp

unread,
Aug 11, 2026, 4:24:02 PM (13 days ago) Aug 11
to PreTeXt development
I think this is mainly for Oscar.

Now that Active Calculus has released the Doenet version, we are getting reports of memory issues. We have created a coordinator script that will lazily load Doenet activities when they scroll into view and then park them when they scroll out of view. Could we add that to PreTeXt to enable this feature? Recently complaints have been from inside Runestone, but I assume there are no Runestone-specific adjustments to be made.

To activate the Doenet coordinator script, one can simply add this script:
replacing 0.7.23 with the doenetml version of the textbook.

That should activate the lazy loading and parking of the DoenetML iframes. On Runestone, activities should save their state to Runestone before parking. In a PreTeXt book outside Runestone, it is supposed to save the students state on the local page (lost if they reload), so that scrolling away and scrolling back preserves their changes.

If this works, then there is one more change we can make to use a shared doenet worker. I think that will save additional memory because all the iframe sources are coming from the same domain. But, let's try one step at a time.

Duane


Reply all
Reply to author
Forward
0 new messages