Plugin to lazy load tabs in Chromium
What is lazy loading of tabs?
If you are like me, with 100s of tabs open at any given time, and like to re-open them when the browser restarts, read on.
Firefox users would be already familiar with this feature. When Firefox starts and is configured to restore previously open tabs, the tabs are not immediately loaded. They are visible in the tab bar, but a tab is loaded only when displayed. This is called "lazy loading" and it improves startup speed and reduces memory consumption tremendously.
However, Chromium doesn't have this feature. All tabs are loaded as soon as the browser is started. This can bring the system down to a crawl, depending on the capacity of the system and the number of tabs open.
Sloth to the rescue
Sloth is an open-source extension to bring lazy loading to Chromium. It is a simple extension which does its job automatically. There are no configuration options to tweak, etc. Also, you can rest assured that your tabs won't be lost, because it doesn't use any hacks. It uses an API that is officially supported by Chromium.
How to install Sloth
- Download sloth-0.1.zip
- Unzip the zip file somewhere. You will see a
chrome://extensionsin a browser tab
- Click on
Load unpacked extensionand point to the
slotdirectory. That's it.
After installing the screen should look something like this:
How it works
Upon startup, sloth goes through the list of all tabs and marks them as "inactive". Done. That's the crux of it.
In practice, it does a little bit more. It checks the type of tab, and keeps "special tabs" open. Special tabs include tabs created by extensions, or tabs which point to "chrome://" adresses, or "file://" addresses, etc.
It also creates a new blank tab in each window. Without this blank tab, one tab from each window would have loaded by default. In this aspect, it is better than the Firefox implementation.
After the browser startup is complete, the extension has no role to play, so it closes itself to free the computer's resources.
Note: Chromium is the open-source project that is branded and bundled as "Chrome" by Google. This plugin, like other Chromium plugins, works with both of them.
Image credit: Unsplash
Posted on Utopian.io - Rewarding Open Source Contributors