[Gambas-user] Big Gambas3 slowdown on hex edit / compare program

Caveat Gambas at ...1950...
Wed Dec 14 15:59:53 CET 2011


Hi,

I have a program that compares small binary files (either 1k or 4k so
really quite small files!).

The program builds the GUI based on whether the user has chosen to view
the data from a Mifare 1k card or a Mifare 4k card.

Problem is that when building the view for the 4k card, the program
slows down to a crawl.  There are 8192 textboxes built in 2 columns of
64 panels (64 textboxes per panel), with a bold label against each panel
indicating the sector number on the card.  This arrangement represents
the sectors on a Mifare 4k card.  The side by side column view makes for
a very nice, quick visual check on where the cards differ.

The slowdown doesn't appear to be linear, that is the more items there
are to add (or have been added), the slower and slower it gets.  I get
the impression Gambas may be frantically shuffling things around on the
form, and finding more and more things to shuffle, so taking longer and
longer as each item is added.  To see the slowdown for yourself, just
try selecting Mifare 4k in the dropdown under Mifare Card Type, you
don't need to load any files or run Compare...

I have tried replacing the whole panel/textbox/scrollview thing with a
GridView and it works, a LOT faster, but then you have no possibility to
edit the data (coming in a later version of the program!).

If anyone can take a look and suggest some improvements, I'd be more
than happy!

Kind regards,
Caveat
P.S.  Project is attached, it is a work in progress...!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mifare.tar
Type: application/x-tar
Size: 51200 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20111214/8173bcf9/attachment.tar>


More information about the User mailing list