09-27-2014, 07:40 PM
[THIS HAS BEEN COPIED FROM AN eMAIL AND INCLUDES Gintaras response (below)]
My ? = Technically speaking, how much faster is a CSV file than 'getFile or setFile'? Let's say I have 10 items I want to get/set into variables, such as: filename, filepath, fullFilePath, etc. Is there a significant speed difference?
Here's an example from one of my macros:
--it has 3-levels of "listBox's" (parent list box that calls a child and a child that calls a grandchild listbox)
--each list box has 8 items [1) being the call for a child/grandchild and 2) being 'stop the macro')]
--each item has 10 properties that I store in a database
This means that when I call up this 'listBox' that 180 variables are potentially treated. So, I can either have these all in 180 different 'txt' files and use 'setfile/getfile'; or have all of them in three CSV files or in a SQLite database. So, what is the most efficient time wise? (I know that SQLite opens up a who new dimension of possibilities on how I can treat the data.)
I suppose what I am really after is the consideration that I have of beginning to use an SQLite database for storing my macro oriented data.
Thank,
Kent
*************************
Gintaras' response:
*************************
To measure code speed:
PerfFirst
code
PerfNext
can be more code and PerfNext
PerfOut
The speed depends on how everything is used.
I would use CSV for simple text of less than 100-500 KB total. Else Sqlite.
At first Sqlite's speed may disappoint, but it can be optimized. For example, QM files are Sqlite-based. My main file is 12 MB and I rarely notice a lag.
My ? = Technically speaking, how much faster is a CSV file than 'getFile or setFile'? Let's say I have 10 items I want to get/set into variables, such as: filename, filepath, fullFilePath, etc. Is there a significant speed difference?
Here's an example from one of my macros:
--it has 3-levels of "listBox's" (parent list box that calls a child and a child that calls a grandchild listbox)
--each list box has 8 items [1) being the call for a child/grandchild and 2) being 'stop the macro')]
--each item has 10 properties that I store in a database
This means that when I call up this 'listBox' that 180 variables are potentially treated. So, I can either have these all in 180 different 'txt' files and use 'setfile/getfile'; or have all of them in three CSV files or in a SQLite database. So, what is the most efficient time wise? (I know that SQLite opens up a who new dimension of possibilities on how I can treat the data.)
I suppose what I am really after is the consideration that I have of beginning to use an SQLite database for storing my macro oriented data.
Thank,
Kent
*************************
Gintaras' response:
*************************
To measure code speed:
PerfFirst
code
PerfNext
can be more code and PerfNext
PerfOut
The speed depends on how everything is used.
I would use CSV for simple text of less than 100-500 KB total. Else Sqlite.
At first Sqlite's speed may disappoint, but it can be optimized. For example, QM files are Sqlite-based. My main file is 12 MB and I rarely notice a lag.