Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

reduce size of session-store-1 by removing 'data:' URLs #11582

Closed
diracdeltas opened this issue Oct 17, 2017 · 8 comments
Closed

reduce size of session-store-1 by removing 'data:' URLs #11582

diracdeltas opened this issue Oct 17, 2017 · 8 comments

Comments

@diracdeltas
Copy link
Member

diracdeltas commented Oct 17, 2017

Test plan

#11754 (comment)


My production session-store-1 file is now 23MB. egrep -o '"data:(.+?)"' shows that nearly 80% of this (18MB) of this is data: URLs, mostly favicons it seems. We should investigate if the favicons can be moved to external files or replaced with links to the favicon URL.

@bridiver
Copy link
Collaborator

see 11a2bc4#diff-70ca3257d79251708167c6ce9bf1cd81
You may have some leftover in your session store, but there shouldn't be any new ones being created

@diracdeltas
Copy link
Member Author

i think most/all of the data URLs are from external sites which use data: URLs as their favicon URL

@bsclifton
Copy link
Member

@NumDeP she ( @diracdeltas) wasn't involved with that issue, I was. There are thousands of issues in our backlog, so even though I was involved I had to re-read the details

I don't see any reference to data URL/URIs in that issue, so I wasn't ignoring you

Let's keep things civil here- we want to help 😄

@NumDeP
Copy link

NumDeP commented Oct 17, 2017

Sorry. It's just that from all the crashes I've been hoarding all the S-S-1's locally and going through the process of going through unnecessary data.

@bsclifton
Copy link
Member

@NumDeP I understand your frustration- there are a lot of small details that we're constantly evaluating and trying to assess the priority for (if you use GitHub's Watch feature for this repo for a few days, you'll get a sense of how many requests we get).

If you have a suggestion for what we can remove, that is appreciated. Please do know that harassment of any kind (including comments or language which make a contributor uncomfortable) is not welcomed

We keep a fairly up to date record of what goes into the session store here:
https://github.com/brave/browser-laptop/blob/master/docs/state.md

If you find data that you think can be removed, please open an issue. If you're not comfortable with making a PR, we should be able to help make the change (or we could also give it some visibility by tagging it as good-first-bug or similar).

@diracdeltas
Copy link
Member Author

i have a fix for this, it seems to help for performance but would be good to test against a benchmark

diracdeltas added a commit that referenced this issue Nov 1, 2017
This moves data:* URLs in the ledger appState to external image files, which
reduces the size of my session-store-1 from ~25 MB to 5 MB.

Fix #11582

Test plan:
1. Copy session-store-1 from a Brave profile that has had payments enabled for a while to your brave-development appData directory.
2. Start the browser and go to about:preferences#payments. The synopsis table should appear fine.
3. Close the browser.
4. In your brave-development appData directory, you should now see a ledger-favicons subdirectory which contains a lot of image files. You should also notice that session-store-1 is now much smaller.
5. Repeat step 2.
@diracdeltas
Copy link
Member Author

added ledger label because all the data favicons i had were from the ledger

@bsclifton
Copy link
Member

Moving to 0.20.x (as the next 0.19.x release is reserved for Chromium 63)

@alexwykoff alexwykoff added the priority/P4 Minor loss of function. Workaround usually present. label Nov 29, 2017
diracdeltas added a commit that referenced this issue Dec 2, 2017
This moves data:* URLs in the ledger appState to external image files, which
reduces the size of my session-store-1 from ~25 MB to 5 MB.

Fix #11582

Test plan:
1. Copy session-store-1 from a Brave profile that has had payments enabled for a while to your brave-development appData directory.
2. Start the browser and go to about:preferences#payments. The synopsis table should appear fine.
3. Close the browser.
4. In your brave-development appData directory, you should now see a ledger-favicons subdirectory which contains a lot of image files. You should also notice that session-store-1 is now much smaller.
5. Repeat step 2.
diracdeltas added a commit that referenced this issue Dec 6, 2017
This moves data:* URLs in the ledger appState to external image files, which
reduces the size of my session-store-1 from ~25 MB to 5 MB.

Fix #11582

Test plan:
1. Copy session-store-1 from a Brave profile that has had payments enabled for a while to your brave-development appData directory.
2. Start the browser and go to about:preferences#payments. The synopsis table should appear fine.
3. Close the browser.
4. In your brave-development appData directory, you should now see a ledger-favicons subdirectory which contains a lot of image files. You should also notice that session-store-1 is now much smaller.
5. Repeat step 2.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.