Noticed an increase in bundle size with 2.5.0-Beta2 and was wondering to which YT issue/PR this is related.
This seems related to something file-level.
Yes, that's the one. Basically, we now do the correct thing and don't leave files in partially initialized state whenever a top-level property initializer throws an exception. This does increase the bundle size a bit, but we're working on mitigating this with effect and data flow analyses that are coming soon.
e
Edoardo Luppi
10/23/2026, 2:00 PM
Thank you! And no worries for the bundle size, it's negligible for 99% of the cases I believe. Other changes I've noticed are in these screenshots.
Another point where you can act for bundle size to mitigate this increase is youtrack.jetbrains.com/issue/KT-68271. This one, especially when a lot of stuff is exported, would take off quite a bit of size imo.
Edoardo Luppi
10/23/2026, 2:02 PM
Temporary variables are also handled much better in 2.5.0. Local
tmp
variables are mostly eliminated.
a
Artem Kobzar
10/23/2026, 3:41 PM
We're also working on removing effectless static initializers, so probably it would be better in the next release.