Cookie Clicker

Cookie Clicker

GM's Helper
This topic has been locked
Jamඞ  [developer] 16 Mar, 2024 @ 2:14pm
🐛BUG: 🧙‍♂️ Auto Caster combo LAGs
Report moved here from the comments:

Originally posted by 90:
90 14 Mar @ 8:06am
For whatever reason, enabling the Auto Caster causes unbearable performance drops. How exactly is it meant to work, and can this be addressed at all?

Jamඞ [author] 14 Mar @ 10:09am
@90 Sure I can take a look! Can you please tell me what is your fps before and after toggling it?

It works on the background by checking some conditions are met before casting combos. I wouldn't expect it to be as slow by itself, so please also tell me what other toggles you have active (or not active, whichever is less)

Originally posted by 90:
90 14 Mar @ 10:16am
I went and grabbed FPS Graph to gauge the following.

The moment I toggle the auto-caster on, my FPS drops from the usual 25 to as low as 2. Overall game logic also soars from taking about 2ms per tick to over 300ms, with seemingly no upper limit. Presumably, there's some sort of memory leak at play?

Originally posted by 90:
90 14 Mar @ 10:23am
Forgot to mention, the moment I disable the auto-caster performance instantly returns back to normal. This happens irrespective of any other toggles enabled.

Jamඞ [author] 14 Mar @ 12:04pm
Thank you! You can also use steam's: Steam > Settings > In-game. (For other games)

I'll make some better changes later in the day after work, as what I quickly tried isn't a noticeable performance boost.

Jamඞ [author] 20 hours ago
@90 Please tell me if this update changes your fps notably or barely.
If the latter, do you have mods that add more eggs? or, if any, which buffs active you have? Does the game lag if you hover over the Force the Hand of Fate spell in the grimoire too?

Originally posted by 90:
90 2 hours ago
It's much better now. Performance still drops somewhat, but the logic is at least capped out at around 20-25ms per tick compared to ~2ms without the Auto Caster on.

FPS Graph reports a drop of only about 7-8 (browser) FPS from 25 to 17-18, while Steam's FPS counter reports a drop from ~150FPS to ~105.

Originally posted by 90:
I should note it does occasionally still get unstable if I actively mouse around in-game, briefly going to about 8 FPS (out of the 25) with the Auto Caster on.
Last edited by Jamඞ; 16 Mar, 2024 @ 2:20pm
< >
Showing 1-5 of 5 comments
Jamඞ  [developer] 16 Mar, 2024 @ 2:23pm 
To continue testing tomorrow, please help me answering these questions:
- If you start the game with other mods disabled, this lag still happens when toggling ON the AutoCaster?
- Does the game lag if you hover over the Force the Hand of Fate spell in the grimoire too (without the AutoCaster ON)?
90 17 Mar, 2024 @ 8:50am 
Originally posted by Jamඞ:
To continue testing tomorrow, please help me answering these questions:
- If you start the game with other mods disabled, this lag still happens when toggling ON the AutoCaster?
- Does the game lag if you hover over the Force the Hand of Fate spell in the grimoire too (without the AutoCaster ON)?
My apologies, it looks like disabling all mods completely eliminated the lag caused by the Auto Caster. Apparently the culprit would in fact be Cookie Monster when running alongside the Helper add-on.

With Cookie Monster enabled, the game does also lag very slightly when hovering over Force the Hand of Fate: logic time increases from 2-3ms to around 5-10ms, wildly fluctuating within that range. Otherwise, it remains at 1ms, only occasionally spiking to 2ms for split-seconds while hovered. I imagine the stronger lag is caused by CM's recovery time calculation displayed when hovering over spells.

Had I known it was predominantly because of CM, I probably would not have made as much of an issue of the Auto Caster's performance.
Last edited by 90; 17 Mar, 2024 @ 8:56am
Jamඞ  [developer] 17 Mar, 2024 @ 11:39am 
Thanks & don't worry about it!
I want to make this mod as compatible as possible, so your report is valid. I can now check directly with that other mod & see what's happening.
It's still odd, as my mod interacts only with the game's code, so I'd have to check what is CM doing with it.
Jamඞ  [developer] 21 Mar, 2024 @ 10:40am 
I have capped a bit more the Autocaster.

After debugging it seems like the bottleneck is merely calls to random's for checking results.
Why this doesn't happen when peeking the grimoire & only when paired with Cookie Monster is beyond me.

But capping the function calls seems to work fine, so hopefully this brings it to a more acceptable FPS.
Jamඞ  [developer] 24 Jun @ 3:24pm 
No more updates since the fix. Closing this thread
< >
Showing 1-5 of 5 comments
Per page: 1530 50