Firefox
Warning
This post is more than a year old. Information may be outdated.
Some quick hacks
userContent & userChrome
Make Browser Tab Bar More Compact
about:configbrowser.uidensity: 0 is the default, 1 is compact, 2 is touch (sparser)
Improving Firefox responsiveness on macOS - Mozilla Hacks - the Web developer blog
- This improvement was achieved via a slight change in how locking is implemented within Firefox's memory allocator.
- Putting a thread to sleep has significant performance implications and, thus, is not always the best option.
- it might be advantageous to let a thread spin briefly if the lock it's trying to acquire is only held briefly.
- It can result in higher performance and lower power consumption, as spinning costs less than sleeping.
- As you might have guessed by now,
OSSpinLockoffered excellent performance on a lightly loaded system but behaved poorly as the load ramped up. - This problem with
OSSpinLockwas known within Apple hence its deprecation - Enter
osunfairlock, Apple's official replacement forOSSpinLock. If you still useOSSpinLock, you'll get explicit warnings to use it instead - So I used it, but the results were terrible. Performance in some of our automated tests degraded by as much as 30%.
- As it turns out,
osunfairlockdoesn't spin on contention; it makes the calling thread sleep right away when it finds a contended lock - The function is
osunfairlockwithoptions()and the options I used areOSUNFAIRLOCKDATASYNCHRONIZATIONandOSUNFAIRLOCKADAPTIVESPIN - The latter asks the kernel to use kernel-space adaptive spinning, and the former prevents it from spawning additional threads in the thread pools used by Apple's libraries
- Did they work? Yes! Performance on lightly loaded systems was about the same as
OSSpinLock, but on loaded ones, they provided massively better responsiveness - I initially fell back to
OSSpinLockas an intermediate solution on older systems. Later I managed to get rid of it for good by relying onosunfairlockplus manual spinning in user space
- 250124
- Super App is a Universal Chat App
- 221010
- 230305
- WebExtension
- Bing Chat for All Browsers Widespread Unavailability Incident (April 23誠鉉)
- DeepL vs. GPT 3.5 vs. GPT 4 벤치마크
- Love Firefox
- Letter to Mr. Gustav Ekerot on 2023-02-24
- One and Only WebExtension
- Safari is the new Internet Explorer
- Apple Newsroom 서체 따라하기
- Porting a Chrome Extension to Firefox Add-on
- Snowpack으로 WASM 시작하기