Still occurs in alpha 2!
So we investigated this, and it doesn't seem related to the C# preview.
It actually starts happening usually after a full extract. The the GC starts freaking out and freeing a little amount of memory every few seconds, which takes a long time.
I have yet to test more, but it might also be related to documentation generation during the full extract. Perhaps disabling this (which you can do in the new Options tab of the Extractor in Alpha 3) could help.
In most cases, restarting Unity fixed it. In some cases though, it didn't, which is beyond surprising to me!
Still happens in alpha 3. I ran full extract after installing Bolt on a fresh project. The stutters are also noticeable in play mode.
Video with play mode fps drops/stutters: https://www.dropbox.com/s/qymri0hpahcexwu/2018-12-24_17-52-41.mp4?dl=0
Unity restart does not fix this for me. Disabling all documentation options in extractor also seemingly doesn't improve the situation.
Bolt Version: 2.0.0a3
Unity Version: 2018.3.0f2
NET Version: 4.x
Yup, installed alpha, did an extract during the setup. Closed Unity (as Bolt seems to like that after the initial import) and reopened, and the hiccup is still there.
Exact same Unity and settings as TowerCrow.
The stuttering to a lesser extent also happens in 1.4.1b3. Video: https://www.dropbox.com/s/r9uywva82npg24y/2018-12-29_01-38-01.mp4?dl=0U
It's a fresh project with just Bolt in it. The flow machine is on a square 2D sprite with a Rigidbody2D component on it. The flow only contains this:
Thanks for the report everyone, we're definitely able to reproduce, we're just still puzzled as to why it happens at all. This is definitely a high-priority issue for Bolt 2.
Reported to Unity and confirmed as a bug introduced in 2018.3.
Issue Tracker: https://issuetracker.unity3d.com/issues/gc-dot-collect-is-called-at-regular-intervals-causing-noticeable-lag-spikes-when-using-bolt-asset
Reportedly fixed in 2019.2a: https://unity3d.com/alpha/2019.2
I'll follow up to make sure it gets backported to 2018.4 LTS.
First, they say it's fixed but then they come back and say it's only a partial fix yet the ticket is closed? Weird.
Yup, I'm puzzled and disappointed too. I'll keep a close look on the 2018.3 changelogs to see when the fix lands and I'll have to test for myself.
If the bug is still somewhat there, it means a lot of the core Bolt unit options will have to be redesigned to avoid memory allocation altogether. But that also means slowing down search significantly.
It seems like the issue has been partially fixed in 2018.3.14f1+.
It might be a bit improved in 2018.3.14f1 as I can actually use Bolt 2 at least some. Previously it would hang up right when I add new units and sometimes not even add them. Right now it's better but definitely not fixed.
Quacklin on Discord reported similar issues with Bolt 1.4.3f2 in 2018.4 with hang-ups up to 3 seconds which makes Bolt unusable. 2018.4 might have introduced another regression, but I couldn't confirm this as 1.4.3f2 works fine in 2018.4 for me.
It's a known Unity bug: https://support.ludiq.io/communities/5/topics/2420-periodic-hiccups
So it seems there's an update on the issue:
That's... puzzling, because AFAIK the spikes are not at all noticeable in 2018.2? Am I imagining things?
I'll try to ping them again... Thankfully the incremental GC introduced in 2019.2 makes it a lot smoother, but it's not ideal.
Yea, and incremental GC is not at all available if you target WebGL but I guess one could develop for a different target platform and then just do builds for WebGL separately. Not ideal but doable.
Have this issue in graph tab, when playing game in editor/playing build. Is there a way to not have this issue like unity version without bug?
Customer support service by UserEcho