mirror of
https://github.com/floccusaddon/floccus.git
synced 2026-04-25 22:26:06 +03:00
[GH-ISSUE #65] High CPU usage and long Sync times #66
Labels
No labels
browser-specific
bug
correctness issues
enhancement
feature: Google Drive
feature: Linkwarden
feature: git
feature: nextcloud-bookmarks
feature: tabs
feature: webdav
help wanted
native-app
priority: high
priority: low
priority: medium
pull-request
question
question
stale
upstream
waiting for more information
wontfix
🙁 Not following issue template
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/floccus#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arendtio on GitHub (Mar 30, 2018).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/65
Software versions
Steps to reproduce
Nothing special.
Expected outcome
Without any changes to the bookmarks a sync should be done within a second (max 3 seconds).
Actual outcome
Every time Floccus syncs it uses one CPU thread at 100% capacity for about 5 minutes. During that time the browsers seem to have a slightly decreased responsiveness. For example, when I type in some editor the letters sometimes don't appear for half a second or so.
I don't know how Floccus actually syncs, but it looks like it does a full sync every single time. If nothing has changed there are two scenarios that come to my mind:
If that doesn't seem possible I am would be happy to discuss alternatives, as the current logic feels very crude to me.
@marcelklehr commented on GitHub (Mar 31, 2018):
Thanks for reporting! I will investigate soon, once I've sorted out some other bugs.
@marcelklehr commented on GitHub (Mar 31, 2018):
The second scenario you described is actually more or less how floccus syncs. Which is why this is odd. Some people have reported bad performance in Firefox, but I can't reproduce this behavior in my Firefox v59.0.2 (I doubt the patch version difference is the problem here, though).
Firefox
about:debuggingdebugbutton next to floccus entrySync nowfor the account of your choice.@arendtio commented on GitHub (Mar 31, 2018):
Thanks for the nice howto. It was the first time I was 'debugging' a Firefox extension. While obtaining the log, I could see that the networking doesn't seem to be the issue, so my initial assumption was wrong :-D
Firefox Sync is not in use here.
I am not sure what you meant by 'copy the logs', so I just copied the console output (and changed sensitive information):
Overall the whole sync took about 3 minutes. To give you some perspective on what actually happened I have a few bullet points for you:
The CPU is an
Intel Core i7-4770S CPU @ 3.10GHz, so not that new anymore, but it should have no problem with the job and normally all cores are <5% CPU usage.The 'SERVERCREATE' line was probably caused by some bookmarklet. After I removed it from my bookmarks, the message disappeared, but the sync still takes a few minutes.
@arendtio commented on GitHub (Apr 1, 2018):
I took another look into the issue and found out, that the
Parallel.eachcalls insync_deleteFromServerandsync_updateare the loops which take most of the time (Account.js). Btw. during the sync the refresh rate seems to drop to 0.92 fps which might explain the increased input delay.I don't know what the polyfills are about, but I wondered a little how often I found myself within the polyfill.js during debugging. Are there any polyfills required with FF 59?
@marcelklehr commented on GitHub (Apr 2, 2018):
So, it appears, the reason why I didn't experience the performance drop in Firefox probably was that I have an SSD. Firefox apparently reads bookmarks from disk and thus naive usage of its APIs dramatically slows down performance. I've refactored the sync process in v2.0.3 to read all bookmarks from the API in one go to avoid overloading disk usage. Please try the latest version, once it's approved on AMO.
@arendtio commented on GitHub (Apr 2, 2018):
I doubt that it is related to the SSD. Those use-cases would have been caught by the filesystem cache, I've got a SSD here too and the CPU was clearly the bottleneck ;-)
Nevertheless, the issue seems to be fixed with 2.0.3. I had some trouble with the sync after the update (it started a full sync and after a while it tried to create a bookmark that existed already), so I deleted the account and created it again. The initial sync to a minute or so and since then all syncs take only about a second 👍
@github-actions[bot] commented on GitHub (Mar 21, 2023):
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.