Jump to content

[Solved] Fast Real-Time File Read Write


Ascer
 Share

Recommended Posts

It works for me now.

_SQLite_LibVersion=3.31.1
Update of row natation took 7.03948001411146 ms (dik)
Update of all rows where login start with 'seq' took 54.5459210399718 ms (disk)
Copy users table (109k rows + index) to memory took 109.470713377022 ms
Update of row natation took 0.513999208903048 ms (memory)
Update of all rows where login start with 'seq' took 30.038165082691 ms (memory)
Copy back changes to disk took 12.007141253568 ms

Now i need to spent a more time to understood how this all functions works and if they fit to this job or not.

Link to comment
Share on other sites

1 hour ago, Ascer said:

In example below i used 1000 users cuz creation of 100,000 take to long and required 1,12GB pc space

You seem to create the table inside the loop!

Also inserting every row by itself is very slow; wrap the whole loop inside a transaction.

1.12 Gb for 100k rows is enormous (about 11.2 kb per row ???). My users.sq3 example also has ~100k rows but is only a 11 Mb file...

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Just for the record, yes I am getting older .... all the time in fact. :lol:

Not sure you can apply fat and lazy to me though, just because I prefer to usually give my coding help in other ways ... something I have always done ... prior to becoming MVP too. ;)

Take all the programs and scripts I regularly provide here or update, all for free ... no one makes me do it, and hardly something a lazy person would bother with. :blink:

Here is a slightly related one to this topic ... there are others.

And here is a doorway to many more, if mostly unrelated.

And I have provided many many more.

On behalf of all good fat people everywhere, I take offense. :angry:

@Jos - Don't worry, this is not the start of an ongoing conversation, just illumination for those who need it. I will now leave this topic in peace. :)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

@Jos @RTFC @jchd @argumentum @Nine @TheSaint @LarsJ @condoman

Thanks everyone for help.

After a few days of tests where I used many different options i decided to stay with Dictionary. Edited main thread with solution for ppls with this same problem.

Below speed results for using 3 methods to find user nr 100,000 where his table was {name, passwd, range, group}.

  • [ADODB.Connection]:  8ms real-time save/write to file
  • [_SQLite_]:  21ms real-time save/write to file
  • [Dictionary+XML]: 0.06ms memory edit, to save file need spent additional 2s.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...