Performance

Browser Extension system requirements and performance optimization information

System Requirements/Resource Utilization

PixieBrix resources depend on the number of mods activated, the number of frames where those mods are running, and the size of those mods.

The following are estimates for PixieBrix usage:

  • Hard Drive Storage:

    • Browser Extension (Unzipped): 36.4 MB. Note that Chrome has a long-standing bug where older extension versions are retained on disk after updates. If hard-drive space is limited, you may need to run a recurring job to clean old versions of the extension.

    • Package Definitions: 5-25 MB. Package storage space depends on how many mods the user has access to and the size of those mods (e.g. if the mod includes embedded images directly in the package definition.)

  • Memory

    • Extension: 35-130 MB. Includes the background service worker, secure sandbox, and content script. Chrome runs memory garbage collection automatically based on available system memory.

    • Side Panel: 100-200 MB. From a browser architecture perspective, the side panel is a tab. So each open side panel is approximately the memory usage of a tab.

Measuring Resource Utilization/Performance

Basic: Chrome Task Manager

Open the Chrome Task Manager, by clicking Chrome's 3 dot menu and selecting More Tools > Task Manager.

Locate the row for "Extension: PixieBrix".

Viewing the PixieBrix Memory and CPU Foot Print in the Chrome Task Manager

The most important metrics are CPU, Memory Footprint, and Javascript Memory. If the column is not visible, right-click on the on the table header of the Task Manager and enable the metric

  • CPU: the recent measurement of the process’s CPU usage, expressed as the percentage of a single CPU core used

  • Memory Footprint: operating system (OS) memory, including DOM nodes

  • JavaScript Memory: JavaScript heap. The "live" number is the important number, as is indicates the live heap memory in still being referenced/cannot be garbage collected

If you have multiple browser profiles open, also enable the Profile column in order to be able to distinguish between extension instances.

For more information, see the Google Chrome DevTools documentation on fixing memory problems.

Advanced: Use Chrome Lighthouse to Measure Impact on Page Load

Lighthouse is a tool in Google Chrome to measure page performance and quality. To measure the impact of browser extension on page load, you can:

  • Run a Lighthouse performance report without the extension active

  • Run a Lighthouse performance report with the extension active

For each, Lighthouse will generate a report with an overall score as well as other key performance metrics, e.g.: First Contentful Paint and Total Blocking Time.

Example: Chrome Lighthouse Report with PixieBrix Installed

Tuning Memory Utilization

Chromium Memory Saver

Modern Chromium browsers (e.g., Chrome and Edge) include a Memory Saver mode that automatically frees memory on inactive tabs until they are revisited. The browser will also free up PixieBrix's memory from those inactive tabs.

Verify your Memory Saver settings: chrome://settings/performance

Restricting PixieBrix Frame Origins

By default, PixieBrix includes a small bootstrap content script on each frame. PixieBrix then dynamically imports content required to run mods as necessary.

To limit memory utilization, you can set an IT policy restricting PixieBrix to only run on the necessary origins. See Browser Extension Security for instructions

Tuning CPU Utilization

Disabling Expensive Checks

Disabling expensive brick input/output checks requires browser extension version 2.3.3 or later.

By default, PixieBrix performs input and output validation for brick call. The checks can cause slowdowns on machines with limited CPU resources, e.g., Citrix environments.

To disable expensive input/output validation checks, set the disableExpensiveChecks configuration in the browser extension's managed storage:Managed Storage Schema

Viewing Extension Storage Statistics

Contact [email protected] to turn on the ability to view Extension Storage Statistics for the impacted account.

When the flag has been enabled, instruct the user to:

  1. Visit the Admin Console to refresh their settings

  2. Visit Visit Extension Console > Settings to view the statistics

The Extension Storage Statistics card list the hard drive utilization. For example:

The Extension Console > Settings > Extension Storage Statistics card

Troubleshooting Performance Issues

Symptom
Likely Cause
Investigation/Solution

Chrome displays a "Aw, Snap" crash on the tab

The tab used too much memory

Chrome displays a "Page Unresponsive" popup

There is an infinite loop, or high CPU utilization has prevented repainting the page

  • Audit the PixieBrix mods to ensure there are no infinite loops. For example, a state change trigger modifying a mod variable

Content is loading slowly on the page

Slow network connection or slow host website

  • Check the network connection speed

Page animation transitions are laggy after load; panes in the host app temporarily show blank content

An inefficient mutation or intersection observer is slowing down repaints

  • Audit mod button/trigger selectors to ensure efficient native CSS selectors are being used

Last updated

Was this helpful?