Ticket #441 (new task)

Opened 4 years ago

Last modified 7 months ago

Run the GC occasionally

Reported by: Philip Owned by: Philip
Priority: Nice to Have Milestone: Backlog
Component: UI & Simulation Keywords:
Cc:

Description

JS won't automatically run the GC until it's run out of memory, which might be an inconvenient time to freeze the simulation. We should probably call it manually at regular intervals, when it's least likely to cause disruption (e.g. during a frame when it's not also busy doing all the simulation computation), to make it more predictable.

Change History

comment:1 Changed 3 years ago by anonymous

  • Milestone Unclassified deleted

Milestone Unclassified deleted

comment:2 Changed 3 years ago by wacko

  • Milestone set to Backlog

comment:3 Changed 2 years ago by historic_bruno

This seems to be partially fixed now? At least for simulation and AI scripts.

I notice a stutter if I'm, for example, scrolling the map during a game. This is due to the GUI GC running and it's enough to be annoying. The larger the runtime size, the more noticeable the stutter. If running the GC more regularly (perhaps as often as the simulation and AI scripts) would fix that, then it's an idea.

Not sure the impact of GC on random map generation, but it's worth examining.

comment:4 Changed 7 months ago by wraitii

(not sure how relevant this ticket is anymore).

RM have a way to call for a GC, and my AI v3 API adds a way for AI to call a GC, along with the automatic GC once in a while.

comment:5 Changed 7 months ago by historic_bruno

I think the point about controlling when GC occurs is still relevant. We really need to examine its impact on performance.

Note: See TracTickets for help on using tickets.