Help Wanted: Give us Your Slow Doenets!

What are some examples of Doenet activities you’ve written that are too slow? For example, activities that:

  • take seconds to load
  • slow down when you drag a point
  • freeze you when submit an answer
  • etc.

In order to speed up the software, I’d like to collect a sample of real activities that are currently too slow. The more painfully slow, the better!

Here’s an example I ran into that I found surprising. It involves shading a region under a curve to demonstrate probabilities of continuous functions, but there was a slightly noticeable difference in speed based on whether I created the function within the tag or within a block, and then referenced the function within the graph:

Thanks for posting. Yes, it’s strange how the function reference makes it noticeably slower.

This activity makes me sad. It takes over 10 seconds to load…

(For class, I had to break it into separate documents for each problem and create a problem set. That did make it more usable.)

Most of the activities that came to mind have already sped up considerably and only take a couple of seconds now, including the Riemann sum calculator (though I did cheat and not graph distinct rectangles when n>29) and an animated one.

The one I thought to check that still seems slow to load is this one with labeling the unit circle: Doenet

I had to split this one into two activities to assign: Doenet

I made a ticket for this recently, but posting here for visibility - Using function tag is slower than repeating the same expression in different parts of doc · Issue #2072 · Doenet/DoenetML · GitHub

Thanks for the report, Jason. I was able to fix your function-evaluation slowness problem and David’s referenced function slowness. Those fixes will eventually show up in version 0.8dev, though I don’t recommend using that in the classroom.

I don’t yet have a fix for this, but one workaround is to avoid a reference directly to the point $P, but instead grab the coordinates via $P.coords. For example, make your comparisons $P.coords=$points[$ka].coords. (There is a flaw where referencing $P is copying all the constraints over and over again.)

Thanks everyone for the reports. The ones we can’t immediately fix are being tracked in this issue.

Keep the slow document reports coming! It’s helpful to have examples.