Opened 14 years ago
Closed 9 years ago
#441 closed task (fixed)
Run the GC occasionally
Reported by: | Philip Taylor | Owned by: | Yves |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 18 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
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 (9)
comment:1 by , 14 years ago
Milestone: | Unclassified |
---|
comment:2 by , 14 years ago
Milestone: | → Backlog |
---|
comment:3 by , 13 years ago
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 by , 11 years ago
(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 by , 11 years ago
I think the point about controlling when GC occurs is still relevant. We really need to examine its impact on performance.
comment:6 by , 11 years ago
Owner: | removed |
---|
comment:7 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
I'm taking this task, but I won't do anything until we have moved to generational garbage collection, because this will change GC behaviour quite significantly.
comment:8 by , 9 years ago
Milestone: | Backlog → Alpha 20 |
---|
We have, I'm bumping this to ask if it's still needed/already completed?
comment:9 by , 9 years ago
Milestone: | Alpha 20 → Alpha 18 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
We have some heuristics to run GC from time to time now (actually since Alpha18 already), so it can be considered fixed. However, SpiderMonkey is still changing in that regard, so it will probably have to be checked again and adapted with each new SpiderMonkey release. Keeping the ticket open to remind us about that doesn't do much good, so I'll close it.
Milestone Unclassified deleted