80

Steps to reproduce:
Start Orion, and browse as you normally would. After a few days, observe that your memory usage has continued climbing, and observe that the Orion processes are using significantly more memory than when they started, especially as compared to other browsers with similar usage.

Expected behavior:
As a (completely non-scientific) comparison to Brave, a Chromium based browser, Orion handles memory much worse. Brave, after running a day longer than Orion, and being used for regular browsing, is using a total of under 2GB of memory. Orion was using just under 8GB of memory. It seems that perhaps Orion is not releasing memory as it's no longer needed (potential memory leak)

Orion, OS version; hardware type:
Orion: Version 0.99.116-beta (WebKit 614.1.20)
macOS: Monterey 12.4 (21F79) on M1 MacBook Pro 14" with 16GB RAM and 512GB SSD

Image/Video:
I do not have images or video, but I collected the following information:

Extensions installed

  • Bitwarden (1.55.0, Firefox)
  • Dark Reader (4.9.43, Firefox)

Startup Data

Startup time: Friday, July 08, 2022 at 13:21

Tabs open on startup:

Processes running: 7

  • 5 x "Orion Web Content" (269.8, 96.6, 55.3, 24.1, 15.5 MB)
  • 1 x "Orion" (94.9 MB)
  • 1 x "com.apple.WebKit.GPU.Orion" (9.4 MB)

Total memory used: 565.6 MB

Shutdown data

Shutdown time: Sunday, July 10, 2022 at 13:36

Tabs currently open:

Processes running: 10

  • 6 x "Orion Web Content" (700.9, 582.1, 271.2, 58.2, 51.4, 32.9 MB)
  • 1 x "Orion" (5.54 GB)
  • 1 x "Orion Networking" (77.7 MB)
  • 1 x "com.apple.WebKit.GPU.Orion" (37.2 MB)
  • 1 x "Keychain (Orion)" (16.0 MB)

Total memory used: 7.3 GB

After restarting Orion

Tabs currently open:

Processes running: 6

  • 3 x "Orion Web Content" (246.2, 55.7, 30.8 MB)
  • 1 x "Orion" (88.4 MB)
  • 1 x "Orion Networking" (18.0 MB)
  • 1 x "com.apple.WebKit.GPU.Orion" (9.6 MB)

Total memory used: 448.7 MB

    To be clear, the above tab URLs were not just sitting there statically in Orion. I was opening/closing tabs and browsing over the course of 2 days, however those two tabs always remained open during the session.

      6 days later

      As discussed on Discord, I disabled all extensions and ran the browser through "normal browsing" for me (I leave my computer on 24/7, let it sleep while I'm not using it, and leave the browser running all the time). Here is the information I came up with:

      Startup

      Startup time: Thursday, July 14, 2022 at 14:04

      Tabs currently open:

      Processes running: 4

      • 1 x "Orion Web Content" (202.4 MB)
      • 1 x "Orion" (68.2 MB)
      • 1 x "Orion Networking" (13.3 MB)
      • 1 x "com.apple.WebKit.GPU.Orion" (9.6 MB)

      Total memory usage: 293.5 MB

      Shutdown

      Shutdown time: Saturday, July 16, 2022 at 21:41

      Tabs currently open:

      Processes running: 7 (more, see screen shot)

      • 2 x "Orion Web Content" (237.6, 65.2 MB)
      • 1 x "Orion" (851.0 MB)
      • 1 x "com.apple.appkit.xpc.openAndSavePanelService (Orion)" (177.5 MB)
      • 1 x "Orion Networking" (91.2 MB)
      • 1 x "com.apple.WebKit.GPU.Orion" (28.6 MB)
      • 1 x "QuickLookUIService (com.apple.appkit.xpc.openAndSavePanelService (Orion))" (8.7 MB)

      Total memory usage: 1.4 GB

      I've attached a screen shot below showing a tree view of processes in the Activity Monitor, this more accurately captures what processes are running under the Orion process as a parent than simply searching "Orion" in Activity Monitor.

      It appears as though Orion does indeed run much leaner without any extensions, but I don't quite think that is the full story. That said, I didn't try to push the OS to force freeing up any memory, so it's possible (though I don't know how probable) that Orion may have released some of what it is holding on to. It is vastly improved over using extensions.

      • dino replied to this.

        Orion definitely has a problem with freeing memory. Every reload of YT page eats 200 MB of RAM. Only browser restarting helps.

        • Vlad replied to this.

          i0mx9kk Not able to reproduce this. Can you show a video where everytime you relad YT tab it adds 200MB to memory consumption (with all extensions disabled)?

            Vlad Somehow without any extensions it adds around 50-100 MB every time I reload the page.
            Here is a video. Better speed it up because my internet connection is not good rn.

            • Vlad replied to this.

              i0mx9kk Thanks for the video. Can you confirm that the same is not happening n Safari?

                i0mx9kk I am not able to reproduce this. Orion frees the memory as soon as tab is closed. Do you have a video showing otherwise?

                  ajgraves Can you please share little more details about the session lead you to the state where Orion was using GBs of RAM like-

                  1. Have you opened and closed lots of tabs?
                  2. Have you opened and closed lots of windows?
                  3. Have you navigated a-lot on same tabs?
                  4. Have you used lots of YouTube streaming?
                  5. Or anything you think is relatable?

                  we are just trying to debug the root cause, so that we can fix this asap.

                    dino happy to help as much as I can!

                    Yes, I tend to open and close a lot of tabs during the course of browsing. I will also navigate within an open tab a lot. As for opening and closing a lot of windows, I don’t tend to do that. I usually stick with one window and use tabs within it.

                    When I first reported the issue, my browsing did include a lot of YouTube videos. This last time when I tested without extensions, there was a little YouTube viewing, but not as much.

                    Also having similar issues to the point where my M1 macbook air is giving me memory warnings. Just found this thread, will report back with more info.

                    Sorry I don't have logs or screens to share (will start capturing), but I've been experiencing this on my M1 for a long time now. i.e. with zero tabs open, Orion primary process after days of being left open consumes over 2GB of mem.

                    I have to completely quit Orion and restart to regain memory. If left unattended for too long, I my computer crawls until I quit Orion.

                      18 days later

                      I have ran another experiment for nearly two days, and I have to say that the main Orion process seems to be doing much better, but there are several subprocesses that didn't exist when I first opened this bug report that contain a large amount of memory held, so not sure if the "fix" for the main Orion process was by splitting some things out to subprocesses or what. Anyways, on to the results!

                      I performed this test with only one extension enabled, the Bitwarden extension.

                      Startup

                      Startup time: Friday, August 05, 2022 at 19:52

                      Tabs currently open:

                      Processes running: 9
                      1 x "Orion" (92.3 MB)
                      2 x "Orion Web Content" (174.4, 68.6 MB)
                      1 x "Orion Web Content (Prewarmed)" (12.7 MB)
                      1 x "Orion Networking" (20.8 MB)
                      3 x "com.apple.audio.SandBoxHelper" (2.8, 2.8, 2.7 MB)
                      1 x "com..apple.WebKit.GPU.Orion" (9.7 MB)

                      Total memory usage: 386.8 MB

                      Shutdown

                      Shutdown time: Sunday, August 07, 2022 at 10:33

                      Tabs currently open:

                      Processes running: 20
                      1 x "Orion" (709.9 MB)
                      2 x "Orion Web Content" (1.15 GB, 753.5 MB)
                      15 x "Orion Web Content (Prewarmed)" (429.7, 409.0, 267.2, 187.1, 161.6, 151.7, 133.2, 126.1, 116.9, 103.9, 97.6, 94.3, 79.9, 50.2, 49.1 MB)
                      1 x "Orion Networking" (120.1 MB)
                      1 x "com.apple.WebKit.GPU.Orion" (92.7 MB)

                      Total memory usage: 5,283.7 MB

                      So as you can see, in less than two days time spent using Orion, we went from under half a gig to over 5 gigs of memory held by the application. Interestingly there are a ton of "Orion Web Content (Prewarmed)" processes staying around holding on to a decent amount of memory.

                      As to the browsing history that lead me to this state, I poked around in my Library under Orion and found a file history that was a sqlite DB. I used the sqlite DB viewer and exported the table history_items which shows the browsing history. I'm going to filter that down to the time window I recorded this data. That said, after a cursory review, there is a lot of incredibly sensitive information, so I will not post it publicly here, and I'm hesitant to even share it privately.

                      What more can we be doing to help debug this?

                      • Vlad replied to this.

                        ajgraves Thanks for willingness to do this.

                        There are two things I would have you try:

                        • Repeat the test without any extensions. (to rule out extensions/extension support)
                        • Repeat the test with a similar WebKit browser (Safari) to rule out this just being the way WebKit handles memory

                        After these two tests (in as similar conditions as possible) we will have a better picture.

                          Vlad Thanks Vlad! I will disable Bitwarden in Orion for the next test. I will also use Safari for a bit and see what I can come up with in terms of how Safari behaves. In the mean time, let me know if there's any additional data points I can gather, etc.

                            Latest test, see my note in the shutdown section. Basically Orion froze and I had to force quit it, so this test should be considered moot as Orion wasn't given a chance to free memory before it was shut down gracefully.

                            All extensions disabled

                            Startup

                            Startup time: Sunday, August 07, 2022 at 12:22

                            Tabs currently open:

                            Processes running: 5
                            1 x "Orion" (83.1 MB)
                            1 x "Orion Web Content" (252.8 MB)
                            1 x "Orion Web Content (Prewarmed)" (12.0 MB)
                            1 x "Orion Networking" (13.6 MB)
                            1 x "com.apple.audio.SandBoxHelper" (2.8 MB)

                            Total memory usage: 364.3 MB

                            Shutdown

                            Note: Orion completely froze up and I had to force kill it from the activity monitor. I took a screenshot of the current values in the activity monitor, however I don't have full details on the tabs I had open at the time. Unfortunately I'd suggest this test be moot, given that I wasn't able to carefully "walk down" the amount of tabs open, etc, which should give Orion a chance to free some memory it was holding on to. However, I included it in the interest of full disclosure.

                            Shutdown time: August 10, 2022 at 16:22

                            Tabs currently open: approx 20 across 2 windows

                            Processes running: 31
                            1 x "Orion" (553.8 MB)
                            22 x "Orion Web Content (Prewarmed)" (744.8, 737.1, 539.2, 456.6, 454.8, 365.6, 361.7, 336.9, 290.8, 287.2, 277.8, 263.6, 235.0, 206.6, 193.0, 190.1, 169.1, 143.3, 129.6, 118.3, 106.7, 12.4)
                            3 x "Orion Web Content" (712.5, 685.3, 143.1)
                            1 x "com.apple.WebKit.GPU.Orion" (181.2)
                            1 x "Orion Networking" (163.3)
                            1 x "VTDecoderXPCService" (61.9)
                            2 x "MTLCompilerService" (6.0, 5.4)

                            Total memory usage: 9,132.7 MB

                            Going to test Orion again for a couple of days without Bitwarden, then will test Safari to compare.

                            I have this same issue and I've been following this thread. Tried running orion without having bitwarden enabled, though I had RES, privacy badger and ublock origin enabled. Today I noticed my system slow down as it does whenever Orion starts using too much memory and noticed the main process at whopping 6,38GB + all the subprocesses. I had around 15 tabs open at that point, and closing them did not free any memory at all on the main process even after letting the browser sit for couple of minutes. I will also try using Orion without any extensions for a while now, but I doubt it's the extensions' fault. Orion 0.99.118.1-beta on M1 macbook air with big sur 12.4.

                            • Vlad replied to this.

                              BLah @ajgraves

                              As long as the reports are "point in time" reports they are of no use to us. We have no idea whether Safari would behave the same in the circumstances you describe.

                              A valid test would be using Orion and Safari in same conditions (same or similar pages open) with same extensions (if same extensions are not avaialble for safari then use without any extensions) and comparing usage.

                              By observing resource use and comparing them in same/similar conditions (same is not possible) we can derive some conclusions.