import { throttle } from "underscore";

export const requestGarbageCollection =
  // For this global function to be defined, the --expose-gc flag must
  // have been passed to node at the bottom of the ../../meteor script,
  // probably via the TOOL_NODE_FLAGS environment variable.
  typeof global.gc === "function"
    // Restrict actual garbage collections to once per 500ms.
    ? throttle(global.gc, 500)
    : function () {};

import { throttle } from "underscore";

export const requestGarbageCollection =
  // For this global function to be defined, the --expose-gc flag must
  // have been passed to node at the bottom of the ../../meteor script,
  // probably via the TOOL_NODE_FLAGS environment variable.
  typeof global.gc === "function"
    // Restrict actual garbage collections to once per second.
    ? throttle(global.gc, 1000)
    : function () {};

Increase garbage collection throttling delay.
Increase garbage collection throttling delay.

May help with this problem, which seems to stem from too much GC:
https://github.com/meteor/meteor/pull/8728#issuecomment-337636773

If this isn't enough, we could include this commit in 1.6.1:
https://github.com/meteor/meteor/commit/5d212926e795bba714abc9ca2b86429eff2831dd
