Jian L. wrote:
but i just want to use the most basic way to do it… such as by turning
off the force-write of sqlite3
If you have made the change to count up words first and then insert
all the (word,count) records into the database in a single transaction
then it ought to take less than a second. I would expect that the total
number of (word,count) records is in the order or hundreds or perhaps a
thousand or so? Any decent DB ought to insert that in under a second as
a single transaction.
If it is still taking minutes then you are probably not doing the above
somehow. I think in that case you need to post your code again so we can
see what it is doing now.