Hi Chip,

I understand what you are saying.
I did a quick test between append (position = column count + 1) and insert 
(position = 1)
I don't have the feeling it makes a lot of difference.
And remember, we are not talking about millions of elements. Maybe then it 
would make a difference.
We are talking about inserting 400 empty arrays

Nevertheless, I can understand a lot is going on in the command (I don't know), 
and don't say it is easy stuff
My only hope is that 4D will investigate the command.

And if nothing can be done, then I always can recode a couple of forms and use 
the tips mentioned by the iNUG community (you guys)

Gr,

Piotr

> -----Oorspronkelijk bericht-----
> Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
> Verzonden: dinsdag 5 december 2017 15:59
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> Onderwerp: RE: poor performance LISTBOX INSERT COLUMN
> 
> if I am correct...
> list boxes should/do behave as arrays.
> 
> So... you should - no I have not done the testing - that inserting (add to 
> location
> {<Size of array}) into an array would be slower then appending (adding to the
> end).
> 
> EVEN IF, the array's memory did not have to be reallocated (it does), if you
> insert into location 10 of a 100 element array, 90 elements have to be 
> "shifted"
> to their current location +1 (10 -> 11, 11-> 12 etc).
> This will/does/should add overhead.
> 
> If you are inserting - especially blank/empty columns - rather then appending
> the columns to your list boxes I would expect this to be slower.  In a 
> previous
> email I mentioned that I do dynamic list boxes every where I use them.
> 
> I always (generic code) append the new column(s).
> Listbox Insert column(listbox;size of listbox+1; colname; etc)
> 
> 
> On Tue, 5 Dec 2017 09:11:25 +0000, Piotr Chabot Stadhouders via 4D_Tech
> wrote:
> >
> > I suppose you mean with the same command? Do you mean you think
> > putting the column behind the last could be faster than when putting
> > columns in front others?
> I would expect this to be the case.
> 
> ---------------
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to