Skip to content

add `perform_gc_on_idle` option to automatically perform GC on idle times.

Steffen Michels requested to merge gc into main

What does this MR do?

This adds a function for manually triggering a GC pass. We noticed that an iTasks application sending large amounts of data to editors can use a lot of memory in the browser. This was caused by JS values being held by the ABC interpreter. As the Clean heap was used way less, GC was not triggered often, and therefore the values were not freed often enough.

Running this.util.instance.exports.gc(this.interpreter.instance.exports.get_asp()); periodically solves the issue. This MR adds a proper interface for this.

Changes to public APIs

This adds the method perform_gc to the ABCInterpreter class.

Author's checklist (required)

  • Intermediate commits compile (use git rebase -i main if not)
  • Newly added code has a style consistent with the rest of the repository
  • Newly added code is documented (guidelines)
  • If bugs have been solved, tests have been added (guidelines)
  • A changelog entry has been added (guidelines)

Related issues

Edited by Steffen Michels

Merge request reports