Performance Issues in Test Runs
Browser Test Runs Become Slow
Section titled “Browser Test Runs Become Slow”Symptom: For longer runs, the test run gradually becomes slow and more scripts are aborted.
Resolution: Slow performance can be attributed to a variety of reasons. Below are a few known resolutions.
-
Sahi’s Auto Threading feature must be enabled by setting the below properties in
userdata.properties.- Ensure
sahi.auto_thread.enabledproperty is set as true. - Specify a value for
sahi.threshold.cpu_usageproperty. The recommended value range is 70 to 90. An optimal value for this property varies per system. So run your scripts multiple times to deduce an optimal value for your system.
- Ensure
-
There may be other applications running in your system which have occupied RAM. So ensure that your system has enough RAM available for the test run.
-
Chromium project based browsers employ a
Background Tab Throttlingfeature to achieve power optimization. This feature throttles the performance of background tabs. As a consequence, this slows down the test run in background tabs. To disable this feature, follow the steps as in the examples below.- In browser_types.xml, search for
chrome. Add--disable-background-timer-throttlingto startup options for Google Chrome. - In browser_types.xml, search for
msedge. Add--disable-background-timer-throttlingto startup options for Microsoft Edge.
<options>--no-default-browser-check --user-data-dir=$userDir\browser\chrome\profiles\sahi$threadNo --proxy-server=127.0.0.1:$port --disable-popup-blocking --always-authorize-plugins --allow-outdated-plugins --enable-npapi --incognito --disable-background-networking --disable-component-update --disable-renderer-backgrounding --disable-backgrounding-occluded-windows --disable-background-timer-throttling</options> - In browser_types.xml, search for
-
For AWS instances, it is advisable to enable unlimited mode.
- Login to AWS Management Console.
- Right-click on an instance used as Sahi node.
- Click on Instance Settings > Change credit specification.
- Click on the checkbox for Enable Unlimited mode.
System Becomes Slow during Sahi Test Runs
Section titled “System Becomes Slow during Sahi Test Runs”Symptom: As a Sahi test run proceeds, the CPU utilization and the physical memory usage by Sahi Pro becomes very high. Also, the physical memory usage by ‘Sophos Net Filter’ process gradually rises. Eventually, the system becomes very slow.
Cause: Sophos antivirus continuously monitors Sahi Pro’s internal communication to the domain https://sahi.example.com. This continuous scanning increases the CPU utilization and the physical memory usage by Sahi Pro.
Resolution: Exclude or whitelist https://sahi.example.com in Sophos antivirus, so that it ignores this url.
Windows application crashes during automation
Section titled “Windows application crashes during automation”Symptom: While automating a Windows application, the system gradually becomes slow. The CPU utilization and the physical memory usage by Sahi Pro becomes very high. Also, the physical memory usage by ‘Sentinel One Agent’ process gradually rises. Eventually, the system becomes very slow and the application crashes.
Cause: Sahi Pro continuosly communicates with internal applications every 100 milliseconds. Sentinel One Agent must be continuously monitoring this HTTP communication. This continuous scanning increases the CPU utilization and the physical memory usage by Sahi Pro.
Resolution: Exclude or whitelist below domains in Sentinel One Agent, so that it ignores them.

