Open pfaron opened 2 years ago
It is the duplicate of #1677
@pfaron can you provide (if possible) us a file where we can test this?
Yes, of course! I create the html files using a very basic java program. The html file structure is similar to DDG auto generated html file when exporting bookmarks. Here I provide files with 10000, 50000 and 100000 bookmarks.
duckduckgobookmarks10000.html.txt duckduckgobookmarks50000.html.txt duckduckgobookmarks100000.html.txt Main.java.txt
(Sorry, but I don't really know how to attach files with .html and .java extension, so you will have to change extensions yourselves).
I was just testing this out and could not reproduce an ANR (tested on an API 29 and API 34 emulator with the above sample 100,000 bookmark import).
Describe the bug
DuckDuckGo stops responding while in the middle of importing 50000 bookmarks. Choosing to not terminate the process makes DDG close the Bookmarks view after a while. After restarting the app (reentering the Bookmarks view), only fraction of bookmarks are correctly imported (for emulated Pixel 5 usually around 9000 imported sites, for Xiaomi Mi Note 10 Lite 18000 the first try and 33000 the second try).
On emulated Pixel 5 it also doesn't properly import 10000 bookmarks most of the times.
How to Reproduce
App stopped responding while importing:
The html file content:
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<Title>Bookmarks</Title>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1618844074" LAST_MODIFIED="1618844074" PERSONAL_TOOLBAR_FOLDER="true">DuckDuckGo Bookmarks</H3>
<DL><p>
<DT><A HREF="https://myanimelist.net/manga/1/" ADD_DATE="1618844074" LAST_MODIFIED="1618844074">Manga number 1</A>
<DT><A HREF="https://myanimelist.net/manga/2/" ADD_DATE="1618844074" LAST_MODIFIED="1618844074">Manga number 2</A>
[...]<DT><A HREF="https://myanimelist.net/manga/49999/" ADD_DATE="1618844074" LAST_MODIFIED="1618844074">Manga number 49999</A>
</DL><p>
</DL><p>
Expected behavior
The bookmarks would be correctly imported.
Environment