Photo by Joshua Hoehne on Unsplash
Abstract
I considered rebuilding the lexicon because I was having a performance issue in SuperMemo: After grading, it would take, on average, half a second to transition to the next element. It’s quite annoying as it “hiccups” my workflow. So I decided to rebuild the lexicon to see whether it improves performance. TL;DR: It doesn’t.
From the official documentation on repair options:
Quote
Rebuild lexicon - if you have done lots of lexicon editing in the lexicon registry, and would like to revert to the full lexicon, you can compile the lexicon by checking this box. This option make take a few hours if your computer is slow. Especially, if you have added many long articles to your incremental reading process.
So I let it run overnight. Here’s the full report:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
SuperMemo Report
Activity: Checking the integrity of the collection
Collection: c:\supermemo\systems\my_collection
Date: Saturday, April 4, 2020, **9:30:19 PM**
SuperMemo 18 (Build 18.04, Mar 6, 2020)
Checking 63,165 element records (ElementInfo.dat)
Verifying integrity of element data (63165 elements in ElementInfo.dat)
Verifying knowledge tree (63,165 elements in Contents.dat)
Verifying the priority queue of 54,068 elements
Verifying repetition schedule (Workload.dat and ElementInfo.dat)
Verifying pending queue (Intact.dat)
Verifying A-Factor, Lapses and Repetitions distributions
Building new lexicon: 142,332 texts
Warning!
Changed registry size
Registry: Lexicon
Size reported: 0
Size found: 418221
Process completed at 6:04:53 AM in **08:34:33 sec** (Sunday, April 5, 2020)
NO ERRORS (Checking the integrity of the collection)
|
Note
I woke up the next morning at around 6:15am when SuperMemo had just finished rebuilding. Talking about connection!
I was extremely relieved there was no error. But of course, I’d made a backup collection before doing this so I wouldn’t lose any progress if anything had gone wrong. As mentioned in Hands Down The Most Important Thing In Using SuperMemo, remember to back up your collection before rebuilding lexicon.
I’ve never rebuilt the lexicon since I first used SuperMemo in March 22, 2018. I had 63165 elements and it took me 8 hours and 30 min to finish the whole process. My laptop spec is pretty modern (i7 8550U, 16GB ram, 512GB SSD). Of course, your mileage may vary but I think it’s a good approximation: roughly 1 hours for 8000 elements.
The biggest bottleneck, in my opinion, is that SuperMemo wouldn’t use much computer resource (CPU/memory). During the whole rebuilding process it used 3MB memory. I wish it would take up the free 10GB memory. But it’s not a big deal because I rarely need to do this again.
Sadly no. It still takes roughly half a second to load the next element. For some items it’s instant; for others it takes half a second. Sometimes re-opening SuperMemo would improve the speed, as it does before lexicon rebuild.
If you know any performance hacks or solutions please let me know by email (masterhowtolearnATgmailDOTcom) or Twitter. I’d love to hear from you!