0

I wonder if someone could guide me on some questions about GC on firefox.

  1. Is possible to call the action performed when I click on the button GC using javascript?

    https://i.sstatic.net/JgoNx.png

  2. on about:config there's an option javascript.options.gc_delay.full, is this option the same than clicking on the button gc on about:memory?

    https://i.sstatic.net/dimKW.png

  3. I'm searching about of what of these enumerated options does, and found that:

    • Is the default amount of time to wait from the user being idle to starting a shrinking GC.

    • javascript.options.gc_delay ??

    • javascript.options.gc_delay.full ??

If someone knows the answer to these questions.

1 Answer 1

0

This is not a full answer, but is too long for Comment:

  • Right-click on the GC button and select Inpect element.

  • That opens the button properties, leading to the method called, doGC(), below.

    function doGC() {
      Services.obs.notifyObservers(null, "child-gc-request");
      Cu.forceGC();
      updateMainAndFooter(
        "Garbage collection completed",
        SHOW_TIMESTAMP,
        HIDE_FOOTER
      );
    }
    

To perform garbage collection, perform Cu.forceGC. This is covered in StackOverflow. Hopefully, that can get you started.

1
  • Hi DrMoishe, tried to call doGC() and Cu.forceGC() but it returned as undefined, follow: i.imgur.com/BjYSW8N.png
    – Cesar
    Commented Jan 14, 2021 at 6:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .