Am 11.01.2017 um 15:58 schrieb Mattias Gaertner via Lazarus:
AddAscendingSequence can be slower than a normal Add.
You need to check common cases, not uncommon cases like generating a
5000x5000.
I did not intend to write a general test which covers all "common"
cases, but a test for the most
On 11.01.2017 15:58, Mattias Gaertner via Lazarus wrote:
You need to check common cases, not uncommon
IMHO it's very prone to error to deliberately define something as "common".
Even if you do a decent statistic of usage cases, this can vary after
some time.
-Michael
--
Il 06/01/2017 13:40, Bart via Lazarus ha scritto:
And needless to say that the ICT department has forbidden me to use
this program, because "it is not a commercial progra, and therefore
there is no offical support for it, and unsupported programs cannot be
installed on our system".
I think it w
On Wed, 11 Jan 2017 15:43:53 +0100
Werner Pamler via Lazarus wrote:
>[...]
> >> You'll see also that the new optimized AddAscendingSquence speeds things
> >> up considerably (4.6 sec vs 16 sec for 5000x5000).
> > Why should someone consider an unrealistic test?
>
> What's wrong with it?
Add
Am 11.01.2017 um 14:00 schrieb Mattias Gaertner via Lazarus:
The FPC sources are compiled with -O2 and without any checks.
And TAvgLvlTree had a further call when comparing. I inlined that now.
Please test by compiling lazutils with -O2.
In my tests TAvgLvlTree is a bit faster than the old TAVLT
On Wed, 11 Jan 2017 13:16:34 +0100
Werner Pamler via Lazarus wrote:
>[...]
> When running the test you'll see that the LazUtils tree is almost a
> factor 2 slower than the fpc tree. (0.6 sec vs 0.36 sec for populating a
> 1000x1000 table, 16 sec vs 9.8 sec for a 5000x5000 table). Any idea why
On Tue, 10 Jan 2017 15:24:54 +0100
Werner Pamler via Lazarus wrote:
> > There are two versions of this AVL trees: The FPC unit avltree and the
> > LazUtils unit avglvltree. It is the same tree, but with different
> > names to avoid conflicts.
>
> Does this mean: I can directly replace the TAVL
There are two versions of this AVL trees: The FPC unit avltree and the
LazUtils unit avglvltree. It is the same tree, but with different
names to avoid conflicts.
Does this mean: I can directly replace the TAVLTree by the TAvgLvlTree
and the TAVLTreeNode by the TAvgLvlTreeNode to use the LazUti
On Tue, 10 Jan 2017 14:01:51 +0100
Werner Pamler via Lazarus wrote:
>[...]A standard
> "Add" of the tree calls "FindInsertPos" which seeks for the correct
> position of the new cell. But every time this search starts from the
> root which is unnecessary from my pov because the new cell should
On Tue, 10 Jan 2017 13:23:46 +0100
Bart via Lazarus wrote:
> On 1/10/17, Werner Pamler via Lazarus wrote:
>
> > If the author if the AVLTree is reading this: Is there a way to add a
> > group of nodes to the tree which are already ordered such that they will
> > be adjacent?
>
> I think that
I think that may not be possible. Your data may be ordered already,
but that does not guerantee that there is not already data inside the
tree that must be ordered "inside" the group you add?
I am thinking of loading a spreadsheet from file. Initially the sheet (=
tree) is empty. The cells in
On Tue, 10 Jan 2017 12:10:31 +0100
Werner Pamler via Lazarus wrote:
>[...]
> If the author if the AVLTree is reading this: Is there a way to add a
> group of nodes to the tree which are already ordered such that they will
> be adjacent?
>
> The normal "Add" method assumes that the node can be
Am 2017-01-10 um 13:35 schrieb Graeme Geldenhuys via Lazarus:
>> I can also apply some more sophisticated functions like attribute change,
delete, rename, etc.
>> where I would not like to be resticted on the number of files in any way.
> You don't need to see those items to apply those attribute
On 2017-01-10 12:10, Jürgen Hestermann via Lazarus wrote:
> I can also apply some more sophisticated functions like attribute change,
> delete, rename, etc.
> where I would not like to be resticted on the number of files in any way.
You don't need to see those items to apply those attributes. Spe
On 1/10/17, Werner Pamler via Lazarus wrote:
> If the author if the AVLTree is reading this: Is there a way to add a
> group of nodes to the tree which are already ordered such that they will
> be adjacent?
I think that may not be possible. Your data may be ordered already,
but that does not gue
Am 2017-01-10 um 12:03 schrieb Graeme Geldenhuys via Lazarus:
> My point was that NO application should display so much data to a
> end-user, as it is simply too much.
I disagree.
I have written an (XTree-like) file manager that can log all directories and
files into memory.
Then there is a func
Am 2017-01-10 um 12:24 schrieb Michael Schnell via Lazarus:
> On 09.01.2017 23:28, Werner Pamler via Lazarus wrote:
> What about a two dimensional array of integers pointing to a one dimensional
array of strings, and doing some garbage collection cells are set to empty strings
? (Maybe even iden
On 09.01.2017 23:28, Werner Pamler via Lazarus wrote:
I would be tempted to implement such a table in fpspreadsheet, but its
problem is that it occupies memory for empty cells while the AVLTree
stores only existing cells (at the expense of the cell record which
contains row and column indexes).
Mind you that when you do not know the dimensions of the table AND you
have to increase ColCount several times whilst filling the table, then
I suspect things will slow down significantly, because each increase
of ColCount requires RowCount times a SetLength on each row (which
means re-allocatin
On 2017-01-10 10:51, Jürgen Hestermann via Lazarus wrote:
> Of course, you will not see all the millions of entries at the same time but
> putting it into a VirtualTree will allow you to scroll through them without
> delay.
fpGUI's StringGrid doesn't have any delay on scrolling or jumping to the
Am 2017-01-10 um 11:06 schrieb Graeme Geldenhuys via Lazarus:
> Now if any developers implements an application that actually displays
> that amount of data to the end-user without filtering, I'll be first in
> line to knock them over the head. :-P
I think this is easy with VirtualTreeView as it
On 2017-01-09 15:28, Werner Pamler via Lazarus wrote:
>> > filling a 1000x1000 TStringTable just cost me 76 ms.
>> > A 5000x5000 table however cost me 1248 ms.
>
> Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec
> for 1000x1000 and 10.3 sec for 5000x5000.
I know you guys
On 09/01/17 21:17, Bart via Lazarus wrote:
> On 1/9/17, Lukasz Sokol via Lazarus wrote:
>
>> For such usage, it is rather assumed that NO substring can contain EOL of
>> any kind,
>
> For the intende purpose of TStringTable, this is certainly NOT the case.
I understand that :) and I respect tha
On 1/10/17, Werner Pamler via Lazarus wrote:
> Ah - that's the explanation: you did your test with a predimensioned
> table? Mine started with an empty table, and with every new cell the
> tree sorts the new cell to the correct location and rebalances itself.
> It would be interesting to compare
An empty cell occupies only a nil pointer.
It may sum up, though, if the table is large and sparsely populated.
Mind you that when you do not know the dimensions of the table AND you
have to increase ColCount several times whilst filling the table, then
I suspect things will slow down signifi
On 1/9/17, Werner Pamler via Lazarus wrote:
> I would be tempted to implement such a table in fpspreadsheet, but its
> problem is that it occupies memory for empty cells
An empty cell occupies only a nil pointer.
Mind you that when you do not know the dimensions of the table AND you
have to inc
Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec
for 1000x1000 and 10.3 sec for 5000x5000.
My tests were all "in memory", no disk access whatsoever.
Bart
Mine as well.
I would be tempted to implement such a table in fpspreadsheet, but its
problem is that it occupies
On 1/9/17, Werner Pamler via Lazarus wrote:
> Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec
> for 1000x1000 and 10.3 sec for 5000x5000.
My tests were all "in memory", no disk access whatsoever.
Bart
--
___
Lazarus mailing l
On 1/9/17, Lukasz Sokol via Lazarus wrote:
> For such usage, it is rather assumed that NO substring can contain EOL of
> any kind,
For the intende purpose of TStringTable, this is certainly NOT the case.
> EOL is assumed to be meaning end of a string here. Not unlike TStringList
> assuming EOL
Am 2017-01-09 um 16:28 schrieb Werner Pamler via Lazarus:
Am 05.01.2017 um 16:35 schrieb Bart via Lazarus:
filling a 1000x1000 TStringTable just cost me 76 ms.
A 5000x5000 table however cost me 1248 ms.
Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec for
1000x1000 and
Am 05.01.2017 um 16:35 schrieb Bart via Lazarus:
filling a 1000x1000 TStringTable just cost me 76 ms.
A 5000x5000 table however cost me 1248 ms.
Amazing. I tried the AVLTree used by fpspreadsheet and it needs 0.37 sec
for 1000x1000 and 10.3 sec for 5000x5000.
--
_
On 07/01/17 21:49, Bart via Lazarus wrote:
> I think my current implementation is cleaner.
> As long as you do not plan on having a table > 1000x1000 it behaves
> quite nicely IMO.
>
Right now i think, there is a shortage of standard non-visual classes that can
handle
first 2 degrees of separat
On 1/7/17, Lars via Lazarus wrote:
> Isn't there a way to change LineEnding to something like a dummy that
> never gets read...
Yes, just see the code I mentioned.
I did not like it.
I even contemplated string each string base64 encoded (guaranteed to
have no line-endings) inside the TstringList
On Fri, January 6, 2017 10:35 am, Bart via Lazarus wrote:
> On 1/6/17, Michael Schnell via Lazarus
> wrote:
>
>
>> Instead of a two dimensional array of strings you could have use a
>> single dimensional array of StringLists (a less symmetrical way, of
>> course).
>
> That was my frist try (see:
>
On 1/6/17, Michael Schnell via Lazarus wrote:
>> Just implemented sorting.
> Nice !
> (Even if I don't see a straight forward understanding of two dimensional
> sorting).
Imagine you wat the rows that have the largest values (this depends on
the context) at the top, or likewise columns at the le
On 1/6/17, Michael Schnell via Lazarus wrote:
> Instead of a two dimensional array of strings you could have use a
> single dimensional array of StringLists (a less symmetrical way, of
> course).
That was my frist try (see:
http://svn.code.sf.net/p/flyingsheep/code/trunk/FarmedTools/tableemulato
On 06/01/17 16:46, Michael Schnell via Lazarus wrote:
> On 06.01.2017 16:20, Bart via Lazarus wrote:
>> That makes no sense to me,
> Instead of a two dimensional array of strings you could have use a single
> dimensional array of StringLists (a less symmetrical way, of course).
>
> -Michael
Yeah
On 06.01.2017 16:20, Bart via Lazarus wrote:
That makes no sense to me,
Instead of a two dimensional array of strings you could have use a
single dimensional array of StringLists (a less symmetrical way, of
course).
-Michael
--
___
Lazarus mailing l
On Fri, January 6, 2017 5:40 am, Bart via Lazarus wrote:
> Mind you FF is able to copy the table in plaintext format using Tabs
> as a separator, which would be easy, but IE (which is the only browser
> available to me on the system) cannot do so.
>
> Obviously my boss does not care, he does not ha
On 1/6/17, Lukasz Sokol via Lazarus wrote:
> OK I understand, you don't want to depend on TStrings ?
That makes no sense to me, some methods take a TStrings as parameter...
Maybe you meant TStringGrid instead?
I did not want my code to depend on LCL.
(It does depend on LazUtils though, but that
On 06/01/17 12:07, Bart via Lazarus wrote:
> On 1/6/17, Lukasz Sokol via Lazarus wrote:
>> just having a look at the declaration, haven't skimmed through code yet,
>>
>> do you also plan to add a TStringGrid-like interface for cols and rows
>
> No, I wanted to keep it as simple as possible.
>
>
On 1/6/17, Michael Schnell via Lazarus wrote:
> Looking at the code I could imagine that auto-growing when using the
> Cell property to write an element might be appropriate.
I thought bout that, but rejected it.
> Read/Write form/to a file might be sensible. Here AFAIK, the fpc's
> TStringList
On 1/6/17, Lukasz Sokol via Lazarus wrote:
> just having a look at the declaration, haven't skimmed through code yet,
>
> do you also plan to add a TStringGrid-like interface for cols and rows
No, I wanted to keep it as simple as possible.
Bart
--
___
On 05/01/17 17:10, Bart via Lazarus wrote:
> On 1/5/17, Bart wrote:
>
>> I constructed a TStringTable class that does all I need (and more):
>> - insert, add, delete rows/cols
>> - autogrow colcount (with insertrow)
>> - exchange rows/cols
>> - get/set rows/cols
>> - property Cells[ACol, ARow]: s
On 05.01.2017 18:10, Bart via Lazarus wrote:
Just implemented sorting.
Nice !
(Even if I don't see a straight forward understanding of two dimensional
sorting).
BTW.:
Looking at the code I could imagine that auto-growing when using the
Cell property to write an element might be appropriate
On 1/5/17, Bart wrote:
> I constructed a TStringTable class that does all I need (and more):
> - insert, add, delete rows/cols
> - autogrow colcount (with insertrow)
> - exchange rows/cols
> - get/set rows/cols
> - property Cells[ACol, ARow]: string (read/write)
>
> It can be found here:
> http:/
On 1/5/17, Michael Schnell via Lazarus wrote:
> A two dimensional dynamic array.
>
> If he wants "add" and "delete" etc functions, he can easily embed same
> in a class, plus using a two dimensional array default property for comfort.
Yes, that's what I ended up with.
I constructed a TStringTabl
On 05.01.2017 10:37, Graeme Geldenhuys via Lazarus wrote:
Simply use an array. ;-)
A two dimensional dynamic array.
If he wants "add" and "delete" etc functions, he can easily embed same
in a class, plus using a two dimensional array default property for comfort.
-Michael
--
___
On 2016-12-29 15:59, Bart via Lazarus wrote:
> I am in need of a component/clas that can hold a 2 dimensional "table"
> of strings.
Go back to the basics Simply use an array. ;-)
Regards,
Graeme
--
___
Lazarus mailing list
Lazarus@lists.lazarus-
> I am in need of a component/clas that can hold a
> 2 dimensional "table" of strings.
It has taken me a ridiculously long time to discover bufdataset, but right
now I'm re-writing whole chunks of code to use these. Advantage for me:
Filtering/Locate/Sort. For debug purposes, if you want to see
On 1/2/17, guy barbier via Lazarus wrote:
> why not use the TstringGrid component?
Because I do not want it to depend on LCL (which I forgot to mention).
Bart
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/list
why not use the TstringGrid component?
2016-12-29 19:02 GMT+01:00 Werner Pamler via Lazarus <
lazarus@lists.lazarus-ide.org>:
> Am 29.12.2016 um 16:59 schrieb Bart via Lazarus:
>
>> Hi,
>>
>> I am in need of a component/clas that can hold a 2 dimensional "table"
>> of strings.
>> The dimensions a
Am 29.12.2016 um 16:59 schrieb Bart via Lazarus:
Hi,
I am in need of a component/clas that can hold a 2 dimensional "table"
of strings.
The dimensions are unknown at designtime: I read the data from a HTML table.
The HTML reader provides events that give me the data of each cell,
and that tell
Hi,
I am in need of a component/clas that can hold a 2 dimensional "table"
of strings.
The dimensions are unknown at designtime: I read the data from a HTML table.
The HTML reader provides events that give me the data of each cell,
and that tell me whenever a row is started or closed.
The class
54 matches
Mail list logo