Closed Bug 851919 Opened 11 years ago Closed 6 years ago

Restoring bookmarks from a JSON hangs the UI for several seconds.

Categories

(Firefox :: Bookmarks & History, defect)

22 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 1320534

People

(Reporter: mayankleoboy1, Unassigned)

Details

(Whiteboard: [dupeme])

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130315 Firefox/22.0
Build ID: 20130315030943

Steps to reproduce:

1. Create a backup of your bookmarks to a JSON file. This bug is easier to repro if you have a large number of bookmarks.
2. Start a fresh Nightly profile.
3. In the bookmarks menu, restore the bookmarks JSON file created in step1.


Actual results:

The Nightly UI is completely frozen till the JSON backup is over. I use a SSD. I think on a HDD, the hangs could be longer.


Expected results:

UI should remain fully functional while a bookmark restore is being done.

Profile : 
http://people.mozilla.com/~bgirard/cleopatra/#report=45af77a9b8e6549f5cc2a7d1304aa8c546b7bdfb
Component: Untriaged → Bookmarks & History
Whiteboard: [dupeme]
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:22.0) Gecko/20130315 Firefox/22.0

Investigated this on Nightly (buildID: 20130315030943) and latest Nightly (buildID: 20130408030928).
With 1344 restored bookmarks I get no hang what so ever. 
With 2688 bookmarks I get a slight hang (about 1 sec).
With 5376 bookmarks the hang is more obvious (5-6 sec).
I went a little further and restored 18070 bookmarks. That really hangs the browser instantly and I receive a message:
"A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: resource://gre/componentes/PlacesCategoriesStarter.js:40"
With the option to Continue or Stop script.

What also hangs the browser is when I go to the folder where the bookmarks are saved and hit Ctrl+A, and before the action is completed click inside the browser and click again in the bookmark folder.
the problem is that we restore bookmarks from the Library, the library contents update when given operations are done, let alone when thos happen thousands of times. This could be a duplicate though.
well, confirming for now, we may decide to disable the views while the restore happens.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is being addressed in bug 1320534 & others. Already the import has been made async, so hopefully it'll be better already, and there's more work being done that'll improve it further.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → DUPLICATE
You need to log in before you can comment on or make changes to this bug.