Use case
I need to create a lot of bookmarks, thousands in the absolute worst case, but typically dozens to a couple hundred.
Goal
I have a bookmark tree structure in memory, and wish to “import” it into the browser’s bookmark collection.
Problem
Using bookmarks.create()
is rather slow for large trees. I was hoping that there would be an alternative API method, accepting trees, or even any kind of iterable over bookmark nodes that would optimize the creation of the batch. However, as far as I can tell no such method exists or is planned to be implemented in the future.
Question
Is there anything I can do with the state of the API today to squeeze significantly better performance than just calling bookmark.create()
for each node of the tree in memory?