ArC: optimize the generated dependency graphs for the Dev UI
Description
It can cause high memory consumption for apps with many beans (thousands) and complex hierarchy.
See also https://quarkusio.zulipchat.com/#narrow/channel/187030-users/topic/High.20memory.20consumption.20during.20build-phase.20on.20a.20big.20monolith
Implementation ideas
- optimize the generated JSON
- load the JSON on demand (?)
- introduce a limit to turn this feature off automatically
You added a link to a Zulip discussion, please make sure the description of the issue is comprehensive and doesn't require accessing Zulip
This message is automatically generated by a bot.
/cc @Ladicek (arc), @cescoffier (devui), @manovotn (arc), @phillip-kruger (devui)
@mkouba just for people who are interested, could you point to the code that handles this?
Thanks
@mkouba just for people who are interested, could you point to the code that handles this?
Thanks
Ofc, this would be a good starting point: https://github.com/quarkusio/quarkus/blob/main/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/devui/ArcDevModeApiProcessor.java#L66-L95
🙏
I've created a draft PR to test various options: https://github.com/quarkusio/quarkus/pull/47633
introduce a limit to turn this feature off automatically
I believe this makes sense regardless of how efficiently the graph can be created and loaded because if there is a huge number of beans, how useful would the graph be anyway?
introduce a limit to turn this feature off automatically
I believe this makes sense regardless of how efficiently the graph can be created and loaded because if there is a huge number of beans, how useful would the graph be anyway?
That's a good point. We could actually also disable this feature (skip graph generation) if a specific graph (we do generate one graph per bean) contains more than N dependencies. Note that we currently limit the "visible depth" to 10 levels (in Dev UI 1 it was configurable but it's hardcoded in Dev UI 2).
👍🏽
Should we close this now that https://github.com/quarkusio/quarkus/pull/47633 is in?
👌🏽