MS Forms Tree View Slow Loading Issue (1 Viewer)

Edgar_

Active member
Local time
Today, 03:54
Joined
Jul 8, 2023
Messages
430
@MajP
Thanks for sharing your dataset for testing.

You have made a very educational demo. I don't know how much of the existing code is a part of the tree view examples, but it seems like a challenge to try to evaluate right now. I did make tests with the three versions.
Light recursive load was fast as advertised. It only builds the necessary nodes to begin and that is reasonable. Full recursive load and full non-recursive load were slow, I don't know which one is slower because I did not check the times, but the two froze Access. I was not able to reproduce the crash, though.

Once I get some free time, I will try to load only the initial nodes to see how it performs.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 04:54
Joined
May 21, 2018
Messages
8,529
One thing I observed is that it seems to slow down almost exponentially with the number of nodes. So 2000 nodes takes much more than double the time it takes to load 1000, and so on. This is another reason why just loading the minimum amount and then as needed is so efficient.
 

Pac-Man

Active member
Local time
Today, 13:54
Joined
Apr 14, 2020
Messages
416
Hi,

Sorry for late responding. I checked the demo light load is much faster than full load (big hand for @MajP). However there is a bit of delay when expanding a node in light load that is understandable that it load the nodes. One thing more, there are different number of child nodes on expanding a node for the first time and the second time.

I could not apply it in my project yet because the version of JKP class modules in my project are v26.3 whereas in wrapper demo are v25 (there is no NodeClick event in v26 however there is mCtrl_Click event but code in it is completely different from NodeClick). I am still trying to understand how to get into my project.
 
Last edited:

MajP

You've got your good things, and you've got mine.
Local time
Today, 04:54
Joined
May 21, 2018
Messages
8,529
One thing more, there are different number of child nodes on expanding a node for the first time and the second time.
That is a big problem. There may be something in my logic so I will have to relook and see if I can replicate.

I could not apply it in my project yet because the version of JKP class modules in my project are v26.3 whereas in wrapper demo are v25 (there is no NodeClick event in v26 however there is mCtrl_Click event but code in it is completely different from NodeClick). I am still trying to understand how to get into my project.
This was a big problem with the JKP class IMO. If you look at my demo you will see I added code for 2 additional events. NodeClick and NodeExpanded. I believe I put comments in the JKP class where I made updates. Just search for "MajP" and or "Added".

If you cannot replicate what I did in 26.3 then I will give you an update when I get a chance. I will be busy this week. It is only a few lines of code. I created 2 events and raise them later in the code.
 

Pac-Man

Active member
Local time
Today, 13:54
Joined
Apr 14, 2020
Messages
416
That is a big problem. There may be something in my logic so I will have to relook and see if I can replicate.


This was a big problem with the JKP class IMO. If you look at my demo you will see I added code for 2 additional events. NodeClick and NodeExpanded. I believe I put comments in the JKP class where I made updates. Just search for "MajP" and or "Added".

If you cannot replicate what I did in 26.3 then I will give you an update when I get a chance. I will be busy this week. It is only a few lines of code. I created 2 events and raise them later in the code.
Thanks a lot for the help. I'm truly thankful for the help. I'm trying to replicate it in 26.3 will update here if I'm able to understand the code and adapt it. Thanks again for your precious time.
 

Users who are viewing this thread

Top Bottom