Alamantus / Lexiconga

The quick and easy dictionary builder for constructed languages.
https://lexiconga.com
10 stars 2 forks source link

Large CSV Word Import Crashes Browser #39

Closed Alamantus closed 5 years ago

Alamantus commented 5 years ago

User /u/drgn2580 on Reddit reported that when importing their 8000+ line CSV file, their browser crashed before ever completing the import and when reloading, it only had imported a part of the words. This occurred even when they cut down the number of lines to 3500+.

They provided the 3500+ line file on Dropbox for testing: https://www.dropbox.com/sh/45rtjzo13vbe0xg/AADjnXYLiLyDbNRgeEySn0HBa?dl=0

Alamantus commented 5 years ago

After looking into the word import process, I found that Lexiconga attempts to both sort and save the dictionary after every single word that's imported! This is clearly the wrong way to handle it!

I'm working on a fix for this right now. I might add a save every 100 or so lines just in case anything goes wrong during a long import, but I'll definitely remove saving after every word!

Alamantus commented 5 years ago

I just uploaded the fix in b2db35982f79961edaac95ac00561048e0765023.

Lexiconga now only sorts and saves after every 500 words imported before saving after the whole file is done.