Form loading Delay


Author
Message
Brad Vick
Brad Vick
StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)
Group: Forum Members
Posts: 33, Visits: 88




I implemented code that recursivley loads all the referenced assemlibes into the appDomain. Unfortunately it did not help with the first child form loading, still takes twice as long for the first one to load than the rest. Any other ideas? I will continue searching google.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You may need to take into account the references in the child assembly.  Are they loaded as well?  You can manually load them into the AppDomain.  Bottom line is that you need to know why this is taking longer to load and you need to see where your stop gap is.  One thing you can do is use some of the System.Diagnostics classes to get an idea of where your time is going.

You can use the StopWatch command.  Start it and Stop it in certain locations and popup a message box after certain events showing the time.  This will help you to start learning where your time loss is.

Just FYI, this is always an issue if you have too many assemblies that need to be loaded at the same time on the same form....but you can overcome this by pre-loading the assemblies.  I promise that this works, but you are going to have to expand the code I gave you earlier by making sure any assemblies in the child are loaded as well.  That is why it is fast the second time you go in....the assemblies are loaded in the AppDomain.

One thing you can do is cycle through the loaded assemblies in the AppDomain.CurrentDomain before and after the child is loaded.  You will see that there are more assemblies loaded after than before.  This might help you pinpoint which assemblies you are missing.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search