Results 1 to 8 of 8

Thread: Anyway to speed up form loading?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    Malaysia
    Posts
    64

    Anyway to speed up form loading?

    Does anyone know of anyway that it would be possible to speed up the process of loading forms.

    With VB6, forms (simple ones) was extremely fast but with VB.net, the initial loading of a form (even the simplest one) takes very long. Although it gets better once it's loaded once and the reloaded the next time (almost instanttaneous), but the first time loading gives a bad impression to any user that .net is actually much slower.

    Is there anyway at all to speed things up?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    format C:
    .
    .
    .
    .
    .
    .
    .
    kiddig I'm really suffering from that as well.

  3. #3
    Member
    Join Date
    Sep 2002
    Location
    California
    Posts
    52
    I don't think there is. As I understand it, when you first load up the form the JIT compiler has to actually compile it, which is why they don't pop up right away the first time you run them. Java also has this problem (although in a different way as Java is interpreted where .NET is compiled).

    To be honest I wish Micrsosoft would give us a choice to actually straight up just compile programs to native code for a targetted OS using the JIT or to compile with with MSIL so it can be platform independant. It should be our choice, not MSIL by default.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    but I guess MS invented this tricky way to secure the code as much as possible.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    Malaysia
    Posts
    64
    the ngen.exe utility in the framework's bin directory is suppose to compile a native image (for running in windows) and store it in the gac to speed things up so that it won't have to recompile every time.

    I've tried it but it doesn't seem to help much.

    Anyone had better luck with the ngen utility?

  6. #6
    Junior Member
    Join Date
    Jun 2010
    Posts
    19

    Re: Anyway to speed up form loading?

    Hi guys, I am using Vb.Net 2008 and I am having the exact same issue as forms first load is very slow and it gets better in subsequent loads of the same form. Anyone had an idea of using Ngen with VS? Please help..

  7. #7
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Anyway to speed up form loading?

    To be honest I wish Micrsosoft would give us a choice to actually straight up just compile programs to native code for a targetted OS using the JIT or to compile with with MSIL so it can be platform independant. It should be our choice, not MSIL by default." .... this statement intrigues me... as it's contradictive... you're asking for the option to use JIT OR MSIL.... as if they can be used independently...

    When you compile an app.... it gets compiled to MSIL ... when you then run the app, the JIT takes over, "finishes" the compiling and runs the app... So the choices should be MSIL/JIT OR full-compile to native code.

    However... there's an issue with that. What to do about the framework? If you did a full native code compile, how do you deal with the FW linked assemblies?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Anyway to speed up form loading?

    GAH! DANG IT! .... Dang blast it... I didn't notice the age on this thread.... grrrr!
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width