How to debug slowness

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
xtal256
Moon lover
Moon lover
Posts: 77
Joined: 2014-06-22, 00:32
Location: here

How to debug slowness

Unread post by xtal256 » 2024-05-15, 00:21

For a long time I have experienced slowness and hangs after using the browser for a while, with the only fix being to restart the browser. This happens most often when watching videos on YouTube, with me having to restart it a few times a week. Other websites are not as bad, but I can't really have more than 10-12 tabs open at once before things start to slow down and eventually force me to restart. If I don't pre-emptively restart then certain operations like loading a site will hang for a few minutes or indefinitely.

The unfortunate reality is that software is becoming more bloated and almost all websites (even the simplest ones) suffer from this. However, I don't accept that the browser should get slower and hang due to this and think that it instead might be a misbehaving add-in with a memory leak or something.
The problem is that I have no tools to debug this. Viewing the stack trace in something like Process Explorer or Process Hacker (now called System Informer) gives me a high level overview of what the code is doing but just tells me that it's in the JavaScript engine or xul.dll.
Is there any sort of logging I can turn on? Some way of profiling the JavaScript that the browser itself is running. There used to be a way of opening the dev tools on the browser chrome but I can't find that option any more (or maybe I am just thinking of DOM Inspector).

Operating system: Windows 10 64-bit
System specs: Intel i7-8700K (12 core), 64GB RAM
Browser version: 33.1.0
32-bit or 64-bit browser? 32 bit
Browser theme (if not default): My own custom theme
Installed add-ons:
  • Adblock Latitude 5.0.9
  • Clear Search 2 1.1.2
  • DOM Inspector 3.1.7534
  • Download Manager (S3) 4.13
  • Forecastfox (fix version) 2.4.8
  • ImageTweak 0.25.1.2
  • JSONovich 1.9.7.1.2
  • keyconfig 20110522
  • LastPass 3.3.4
  • lori (Life-of-request info) 0.2.0.20080521.2
  • Markdown Viewer 1.12
  • Menu Wizard 5.05
  • Organize Status Bar 0.6.5
  • Pale Moon Commander 3.0.1
  • Stylish 2.0.7
  • Tab Mix Plus 0.5.8.4
  • Tab Scope 1.6.1.2
  • Windowify Manager Pages 2.0
  • Greasemonkey 1.15 (disabled)
  • Web Developer 1.2.11 (disabled)
Installed plugins:
  • Microsoft Office (File: NPSPWRAP.DLL)
  • Silverlight Plug-In (File: npctrl.dll)
  • Microsoft Office (File: npMeetingJoinPluginOC.dll)
All of the above plugins are disabled.

Important prefs:
  • accessibility.typeaheadfind = true
  • accessibility.typeaheadfind.flashBar = 0
  • browser.cache.compression_level = 1
  • browser.cache.disk.capacity = 204800
  • browser.cache.disk.filesystem_reported = 1
  • browser.cache.disk.smart_size_cached_value = 358400
  • browser.cache.disk.smart_size.enabled = false
  • browser.cache.disk.smart_size.first_run = false
  • browser.cache.disk.smart_size.use_old_max = false
  • browser.cache.memory.enable = false
  • browser.display.background_color = #C0C0C0
  • browser.display.use_system_colors = true
  • browser.download.importedFromSqlite = true
  • browser.download.manager.showAlertOnComplete = false
  • browser.download.manager.showWhenStarting = false
  • browser.fixup.alternate.enabled = false
  • browser.places.importBookmarksHTML = false
  • browser.places.importDefaults = false
  • browser.places.leftPaneFolderId = -1
  • browser.places.migratePostDataAnnotations = false
  • browser.places.smartBookmarksVersion = 4
  • browser.places.updateRecentTagsUri = false
  • browser.privatebrowsing.dont_prompt_on_enter = true
  • browser.search.openintab = true
  • browser.search.suggest.enabled = false
  • browser.search.update = false
  • browser.search.useDBForOrder = true
  • browser.sessionstore.restore_on_demand = false
  • browser.startup.homepage = https://www.google.com.au
  • browser.startup.homepage_override.buildID = 20240419202341
  • browser.startup.homepage_override.mstone = 6.6.0
  • browser.tabs.agePerSeconds = 1
  • browser.tabs.agingAmount2 = 5
  • browser.tabs.closeWindowWithLastTab = false
  • browser.tabs.highlightActiveTab = false
  • browser.tabs.selectOwnerOnClose = false
  • browser.tabs.warnOnClose = false
  • browser.urlbar.autoFill = false
  • browser.urlbar.formatting.enabled = false
  • browser.urlbar.matchBehavior = 2
  • browser.urlbar.maxRichResults = 7
  • dom.max_script_run_time = 0
  • dom.mozApps.used = true
  • extensions.lastAppVersion = 33.1.0
  • font.default.x-western = sans-serif
  • font.internaluseonly.changed = false
  • general.useragent.extra.microsoftdotnet = (.NET CLR 3.5.30729)
  • general.useragent.updates.lastupdated = 1715717513824
  • gfx.blacklist.suggested-driver-version = 257.21
  • gfx.crash-guard.d3d11layers.appVersion = 33.1.0
  • gfx.crash-guard.d3d11layers.deviceID =
  • gfx.crash-guard.d3d11layers.driverVersion =
  • gfx.crash-guard.d3d11layers.feature-d2d = false
  • gfx.crash-guard.d3d11layers.feature-d3d11 = false
  • gfx.crash-guard.status.d3d11layers = 2
  • gfx.crash-guard.status.d3d11video = 2
  • gfx.direct3d.last_used_feature_level_idx = 0
  • gfx.font_rendering.cleartype_params.force_gdi_classic_max_size = 7
  • gfx.font_rendering.cleartype.always_use_for_content = true
  • gfx.font_rendering.cleartype.use_for_downloadable_fonts = true
  • media.benchmark.vp9.fps = 302
  • media.benchmark.vp9.versioncheck = 3
  • media.gmp.storage.version.observed = 1
  • media.hardware-video-decoding.failed = false
  • network.cookie.prefsMigrated = true
  • network.enableIDN = false
  • network.http.max-persistent-connections-per-server = 8
  • places.database.lastMaintenance = 1715566029
  • places.history.expiration.transient_current_max_pages = 126118
  • plugin.disable_full_page_plugin_for_types = application/vnd.fdf
  • plugin.importedState = true
  • plugin.state.flash = 0
  • plugin.state.java = 0
  • plugin.state.np-vmware-vmrc = 0
  • plugin.state.npadobeaamdetect = 0
  • plugin.state.npauthz = 0
  • plugin.state.npctrl = 0
  • plugin.state.npdeployjava = 0
  • plugin.state.npfoxitreaderplugin = 0
  • plugin.state.npgoogleupdate = 0
  • plugin.state.npican = 0
  • plugin.state.npintelwebapiipt = 0
  • plugin.state.npintelwebapiupdater = 0
  • plugin.state.npmeetingjoinpluginoc = 0
  • plugin.state.npnv3dv = 0
  • plugin.state.npnv3dvstreaming = 0
  • plugin.state.npspwrap = 0
  • plugin.state.npurlinterceptorplugin = 0
  • privacy.clearOnShutdown.cookies = false
  • privacy.clearOnShutdown.downloads = false
  • privacy.clearOnShutdown.formdata = false
  • privacy.clearOnShutdown.history = false
  • privacy.clearOnShutdown.offlineApps = true
  • privacy.clearOnShutdown.sessions = false
  • privacy.cpd.cookies = false
  • privacy.cpd.downloads = false
  • privacy.cpd.extensions-tabmix = false
  • privacy.cpd.formdata = false
  • privacy.cpd.history = false
  • privacy.cpd.offlineApps = true
  • privacy.cpd.sessions = false
  • privacy.donottrackheader.value = 1
  • privacy.GPCheader.enabled = true
  • privacy.sanitize.migrateFx3Prefs = true
  • privacy.sanitize.timeSpan = 0
  • security.dialog_enable_delay = 0
  • security.disable_button.openCertManager = false
  • security.disable_button.openDeviceManager = false
  • security.OCSP.disable_button.managecrl = false
  • security.tls.version.min = 2
  • security.warn_viewing_mixed = false
  • services.sync.declinedEngines =
  • services.sync.engine.greasemonkey = false
  • storage.vacuum.last.index = 1
  • storage.vacuum.last.places.sqlite = 1715047621
  • ui.osk.debug.keyboardDisplayReason = IKPOS: Touch screen not found.
Last edited by xtal256 on 2024-05-15, 06:13, edited 1 time in total.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5019
Joined: 2015-12-09, 15:45
Contact:

Re: How to debug slowness

Unread post by moonbat » 2024-05-15, 01:32

Might need more RAM than the 4 GB hard limit that a 32 bit system imposes. Also it's better to create separate threads for individual slow websites (after searching to see if there's already similar threads) in the web compatibility board. A general 'everything is slow' query isn't going to be easy to troubleshoot.
If you're running 64-bit Windows 10 and have more than 4 GB of RAM and don't particularly need 32-bit plugins (the only reason to ever run a 32 bit browser build on a 64 bit OS), then consider changing to the 64 bit version of Pale Moon. It won't affect anything else on your profile or settings.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

xtal256
Moon lover
Moon lover
Posts: 77
Joined: 2014-06-22, 00:32
Location: here

Re: How to debug slowness

Unread post by xtal256 » 2024-05-15, 03:14

I'll have to remember to check how much RAM it uses next time it gets slow. I know memory does grow, though I don't recall it ever hitting the 4GB limit.

But if that is the case then it suggests a memory leak. If it's in the core C++ code then that would be something for the Pale Moon devs to investigate, but if it's JavaScript that is eating up all the memory (say, because it is creating many new objects without allowing the old ones to be freed) then it is something I could investigate myself if I had the right tools.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5019
Joined: 2015-12-09, 15:45
Contact:

Re: How to debug slowness

Unread post by moonbat » 2024-05-15, 03:46

You still haven't mentioned how much physical RAM you have and the bitness of your OS.
xtal256 wrote:
2024-05-15, 03:14
But if that is the case then it suggests a memory leak
Use the browser on your regular websites (again, which ones?) using a fresh new profile to rule out any problems with your addons or settings first.
And reminder -
moonbat wrote:
2024-05-15, 01:32
Also it's better to create separate threads for individual slow websites (after searching to see if there's already similar threads) in the web compatibility board.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

xtal256
Moon lover
Moon lover
Posts: 77
Joined: 2014-06-22, 00:32
Location: here

Re: How to debug slowness

Unread post by xtal256 » 2024-05-15, 06:19

moonbat wrote:
2024-05-15, 03:46
You still haven't mentioned how much physical RAM you have and the bitness of your OS.
Oh, sorry. I updated the info in my original post.

I'm starting to notice some slowness now and browser memory hasn't gone above 2GB. I see a lot of spikes in CPU usage though. I imagine that is due to some of the tabs I have open polling the server for updates.
moonbat wrote:better to create separate threads for individual slow websites
Ah I just realised what you meant. I thought you were talking about CPU threads, and I thought that there was nothing I can do about that as I don't work on the Pale Moon code :)
I could create a thread about YouTube being slow, but plenty of people have already done that. My question is more specifically about how I can investigate it myself instead of constantly complaining that "Pale Moon is broken!"

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5019
Joined: 2015-12-09, 15:45
Contact:

Re: How to debug slowness

Unread post by moonbat » 2024-05-15, 06:34

xtal256 wrote:
2024-05-15, 06:19
My question is more specifically about how I can investigate it myself instead of constantly complaining that "Pale Moon is broken!"
First thing about troubleshooting is to rule out any problems due to your extensions or settings changes - for this create a separate fresh profile for testing from the about:profiles page, and run your problematic website on that. If you still see broken functionality or slowness on a fresh profile, it means there's a problem with the site (especially if reported by others as well), or something else with your browser/hardware setup.
If the site runs fine on a fresh profile, then it could be a problem with your extensions; you'll have to disable them one by one and restart after each round to see which one may be causing it. If you're using ancient Firefox extensions, those may not work properly. There may be similar ones on the Pale Moon addons site that are better compatible and currently maintained.

In fact the best thing to do is to test a broken website on a fresh profile beforehand and report the results when asking for help to save yourself and everyone else time spent in troubleshooting :)
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Goodydino
Keeps coming back
Keeps coming back
Posts: 828
Joined: 2017-10-10, 21:20

Re: How to debug slowness

Unread post by Goodydino » 2024-05-15, 17:31

If you clear your cache and history frequently, you should find that the browser is more responsive. If the browser has to stop and clear out the oldest items to make room for the newest, that slows it down. Also, why leave the browser running all the time? You cannot browse 24 hours a day, so why not shut the browser down when you need to sleep, at least?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35785
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: How to debug slowness

Unread post by Moonchild » 2024-05-15, 18:04

Depending on which sites you visit, leaving the browser up 24/7 can have it lose performance due to complex websites leaving "cruft" (that's a technical term) behind after tabs are closed - you can thank document-detached web specifications for that little gem. This can lead to so-called "ghost windows" which can cause issues for the garbage collector as it is not clear if this cruft can be cleaned up or not. If you experience slowness next time, go to about:memory, do a measure, and see if there are any "ghost windows" - drill down a bit if there are to see which website(s) caused it; that's one part of how you can debug general slowness.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

xtal256
Moon lover
Moon lover
Posts: 77
Joined: 2014-06-22, 00:32
Location: here

Re: How to debug slowness

Unread post by xtal256 » 2024-05-16, 00:46

Thanks Moonchild, I'll try that.

Post Reply