B4J Question [B4X] [XUI] SD FlexGrid (Table) - B4J

Luca1967

Active Member
Hello
i am trying to use this library to view a search done on different folders in B4J.
It is very slow and unusable.
Maybe am I wrong something?
I have to show 3 columns on the screen: Path, file name, and the CRC32 I calculated.
Is there an updated version or am I doing something wrong? I respected the examples.
 

Star-Dust

Expert
Licensed User
Longtime User
Hello
i am trying to use this library to view a search done on different folders in B4J.
It is very slow and unusable.
Maybe am I wrong something?
I have to show 3 columns on the screen: Path, file name, and the CRC32 I calculated.
Is there an updated version or am I doing something wrong? I respected the examples.
This view is not particularly slow compared to others. Do you have many lines to insert? About how big is the list?

Can you give an example? Or at least a small video.

Have you tried to see the calculation time of the CRCs? Maybe try to temporarily remove the insertion of the rows in the grid and measure the calculation time of the entire list.

PS. I suggest you make a small donation and become a licensed user, so we see the messages immediately and not after a few days. Risks that go unnoticed and that no one answers you
 
Last edited:
Upvote 0

Luca1967

Active Member
This view is not particularly slow compared to others. Do you have many lines to insert? About how big is the list?

Can you give an example? Or at least a small video.

Have you tried to see the calculation time of the CRCs? Maybe try to temporarily remove the insertion of the rows in the grid and measure the calculation time of the entire list.

PS. I suggest you make a small donation and become a licensed user, so we see the messages immediately and not after a few days. Risks that go unnoticed and that no one answers you


Hello
I enclose an example.
The program recursively reads the folders and calculates the crc32 of the midi and kar files only.
In my case I have a folder where there are about 8,000 files.
Even if I remove the CRC calculation, the speed does not change.
Maybe I'm doing something wrong.
Thanks for your interest
 

Attachments

  • folderrecursive.zip
    3.9 KB · Views: 220
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
It is necessary to improve the code to avoid constant refreshments and speed up. I modified your example to get the maximum speed.
Obviously, if there are many lines, it takes time

Some suggestions:
  • If there are many lines it is better not to activate the refresh in the Add command. But rather use invalidate when the entire table has been populated.
  • If you have a recursive sub do not use invalidate inside it otherwise it will be called many times and it will slow down everything
 

Attachments

  • folderrecursive.zip
    3.9 KB · Views: 260
Last edited:
Upvote 1

Luca1967

Active Member
It is necessary to improve the code to avoid constant refreshments and speed up. I modified your example to get the maximum speed.
Obviously, if there are many lines, it takes time

Some suggestions:
  • If there are many lines it is better not to activate the refresh in the Add command. But rather use invalidate when the entire table has been populated.
  • If you have a recursive sub do not use invalidate inside it otherwise it will be called many times and it will slow down everything
Thanks.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Have you tried my code? It would be nice to know if you have solved it
 
Upvote 0

Luca1967

Active Member
Have you tried my code? It would be nice to know if you have solved it
I tried and thank you.
I had already tried with the invalidate but nothing has changed.
The speed is very slow (it takes almost 2 minutes to load a list of 8000 items).
I don't know why.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
You put the invalidate inside the recursive sub and did continuous refreshments. in my example it's just at the end.
 
Upvote 0
Top