AntAlmanac icon indicating copy to clipboard operation
AntAlmanac copied to clipboard

Section table elements all add their own listener to AppStore, which uses lots of memory

Open EricPedley opened this issue 1 year ago • 0 comments

As mentioned in #133, every SectionTableBody adds two listeners to AppStore, which causes a warning so we had to manually increase the max listeners. I did a little experiment with the Firefox Profiler in devtools to see if it actually uses significant amounts of memory, and my preliminary results suggest the answer is yes.

To get these results, I started the profiler with "JS Allocations" turned on in settings, then searched bio sci and scrolled down through the results to get every section to load.

With listeners - 8 mb: image

Without listeners (commented out all instances of AppStore.on in CourseRenderPane and SectionTableBody) - <1 mb: image

Before anyone tackles this, make a summary of the entire website's memory usage before you do this, as this issue might actually be insignificant compared to the total usage. If it's insignificant, post the results and close this issue.

EricPedley avatar Jun 04 '23 08:06 EricPedley