Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Why there are multiple "Unity Hub" background processes?

Discussion in 'Unity Hub' started by Peter77, Mar 24, 2020.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,569
    I'm using HUB 2.3.1. Why there are multiple "Unity Hub" background processes?

    upload_2020-5-9_7-43-30.png


    The number of Unity Hub background processes varies. Sometimes it's 2, 3 or 4 sometimes even 5. My PC doesn't have a lot of memory, so those wasted megabytes count for me.

    Why does a program have to use almost 300 mb for just sitting in the background idling? Would be nice if you can tame this memory hungry beast.
     
    Last edited: May 9, 2020
    richardkettlewell likes this.
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,569
    Unity Hub 2.4.2 now (sometimes) even eats more memory when sitting in the background. 370mb for basically a list.

    You really make me wonder if you have a challenge inside Unity Technologies: who creates the most inefficient tools. Otherwise this can't be explained.
    upload_2020-12-5_6-16-11.png
    upload_2020-12-5_6-13-49.png
     
  3. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    172
    @Peter77 in short, because it's really just a Chrome browser stripped down and dressed up as a desktop app. Unlike a regular "native app" this is a "web app" or "hybrid app" built with the same web technologies so it uses up memory similar to having multiple tabs open in chrome that all have their own process, but in this case, these are all the different "pages" of the app's user interface and functionality:
    https://en.wikipedia.org/wiki/Electron_(software_framework)
    https://www.electronjs.org

    Same reason why Visual Studio Code, WhatsApp, Twitch, Slack, Discord, Figma and more waste massive amounts of memory like this, they all use the same Electron framework. And there are other web frameworks just like this. So it's not really something specific to Unity, it's a widespread industry issue. And as long at RAM and web development is relatively cheap, it will continue to drag on this way. Web development is so ubiquitous, besides, not just more economical but easier to find devs and enables building software more rapidly than with "native app" development. It's not impossible to optimize memory usage, though, Slack had a big push for this a few years ago because it was so out of control. It's still pretty bad compared to a "native app" but it's at least tenable: https://slack.engineering/reducing-slacks-memory-footprint/

    @Peter77 worth mentioning this is one of the big reasons (other than security) that the embedded web browser for the Unity Asset Store was removed from Unity Editor --it's a resource hog.

    There's also lot on the horizon for web app performance and memory footprint being improved even further with Rust and C++ via WebAssembly: https://blog.logrocket.com/supercharge-your-electron-apps-with-rust/ Though if are putting this much effort in you might just want to go fully native.

    @Peter77 In the meantime, I have noticed (with Unity Hub 2.4.2 anyway) that if i close the Unity Hub window, it uses significantly less in resources, and I can still right click on the Unity Hub icon on the taskbar to launch my most recent projects without bringing up the entire Unity Hub window and initializing all those extra resources

    In any case, I 100% support the Unity Hub team putting an optimization pass on the roadmap -- or just moving to a fully native app like the Unity Editor itself. A native app UI would presumably be fully cohesive with the Unity Editor at that point, too. Using the same native UI frameworks, etc.
     
    Last edited: Dec 9, 2020
    Ryiah, Peter77 and zrh2126446 like this.
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,569
    About three years later, Unity Hub has regressed even further. What used to be a 300 MB bloat has now become more than 400 MB. Why does Unity Hub 3.4.2 require more than 400 MB when running in the background? Why?


    upload_2023-6-11_15-26-51.png
     
    LooperVFX likes this.
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,482
    400MB doesn't sound so bad... upload_2023-6-11_16-36-13.png

    ...

    At this point, I'm pretty sure you can make a version of the hub in Unity, that has all the functionality and you also play some sort of 3d minigame while it's downloading Unity and it would still be a ton more efficient than what we've got.
     
    Last edited: Jun 11, 2023
  6. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    172
    I know this isn't an option for everyone (especially on a global scale,) but worth mentioning that I just upgraded from 16GB RAM to 64GB RAM (for about $120 USD) to largely mitigate the lack of memory optimization in Unity Hub and countless other electron "web" apps that I'd prefer to have running / in memory at the same time with all the other essential apps in my workflows. Helps with development in general as well at least, as does a SSD solid state drive with high Random IOPs (random read write) performance.

    This memory density and price scaling doesn't seem sustainable however, it's already slowing down, likely correlated to Moore's law dying due to the hard physics limitations of silicon fabrication in general. Notice the cost per TB of Memory in red (and everything else :rolleyes:) flattening out over time.
    https://ourworldindata.org/grapher/historical-cost-of-computer-memory-and-storage?facet=none

    Barring some unlikely sudden breakthrough in both the cost and density of 3d memory stacking technology, this trend will eventually force software development to shift towards memory optimization just as the death of Moore's law has already shifted the software dev paradigm from hardware magically providing faster and faster single threaded computing towards parallel computing.
     

    Attached Files:

  7. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    172
    750MB :eek:

    To your point, I found this alternative unity hub written with efficient c++ and a native wxWidgets UI for mac, linux, windows. All it needs is a pull request for the 3d easter egg minigame :D.

    https://www.ravbug.com/unityhubnative/
    https://github.com/Ravbug/UnityHubNative
     
    Last edited: Jun 11, 2023
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,482
    Yeah, I've seen this before. I've always felt a bit uneasy and didn't use it.

    I feel like it increases my chances of Unity accusing me of mixing licenses or doing something weird.

    But I just installed it and I clicked it to open and when I lifted my finger off my mouse button, it had opened.

    Also:
    upload_2023-6-12_2-1-59.png

    So I figure it's worth the extra chance for some more false accusations.
     
    LooperVFX likes this.
  9. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    172
    I know in terms of bloat this is like comparing apples to pumpkins, but if it makes anyone feel any better: the Unreal Engine developer camp has been suffering with multiple gigabytes of memory usage in the Epic Games launcher since 2015 lol. reports of 8GB, 16GB, even 29GB. reports of only 850MB from people saying they don't have memory usage issues.

    This doesn't excuse Unity Technologies but wow.

    https://forums.unrealengine.com/t/ridiculus-ram-consumption-by-eg-launcher/338158
    https://gamefaqs.gamespot.com/boards/916373-pc/79325116
    https://www.reddit.com/r/F***epic/comments/vm3s7p/tired_of_underutilizing_your_memory_try_using_the/
     
  10. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,482
    I mean that's also electron.

    I'm biased, but I'm more angry at Unity for looking at the Epic situation (or any electron app for that matter) and going "infamously slow memory hogs? Now that's what we want".
     
    LooperVFX likes this.
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,701
    It's not like there aren't alternative frameworks that are lightweight either.
     
    LooperVFX and AcidArrow like this.
  12. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,050
    As far as I know, should have the resources to build a native hub. Am i wrong?
     
    LooperVFX likes this.
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,482
    I don't think it was ever a resources problem.
     
    LooperVFX likes this.