Author Topic: Ngen.exe  (Read 3783 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Ngen.exe
« on: November 06, 2006, 03:23:48 PM »
Is there a way to ngen .net DLL files that I am going to netload? Or is this only for stand alone applications.

Thanks a ton

Troy Williams

  • Guest
Re: Ngen.exe
« Reply #1 on: November 06, 2006, 03:53:44 PM »
I haven't used ngen on a dll before, but you should be able to "ngen myAssembly.dll". Remember ngen will only really help with application startup times.

MickD

  • King Gator
  • Posts: 3619
  • (x-in)->[process]->(y-out) ... simples!
Re: Ngen.exe
« Reply #2 on: November 06, 2006, 04:10:20 PM »
I'm not sure how it will go when Autocad goes to load it, I haven't done any study on it but when loading it may expect an un-jitted assembly to load into the clr whereas an arx would be loaded differently, perhaps you could try it by ngen'ing and renaming the dll to .arx and using appload to load it but I'd doubt it would be that easy.
Perhaps it may work as a netload after ngen, let us know how you go :)
"Short cuts make long delays,' argued Pippin.”
J.R.R. Tolkien

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Re: Ngen.exe
« Reply #3 on: November 06, 2006, 04:49:48 PM »
That’s a good point Mick! I am afraid it won’t work anyway read:

“NGen tool interface was changed to expose a new usage model. Instead of invoking NGen on an individual assembly, NGen is now invoked on an application. This is done by running NGen on the top-level assembly in the application (the top-level assembly is the assembly that is not depended on by any other assemblies).”

It wants to NGen all of AutoCAD, That’s a bummer too since I have a ton of reactors that when fired call a hefty amount of code. The jit time is slightly annoying. I’ll just have to think of a way to fire those reactors at netload

Thanks

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Ngen.exe
« Reply #4 on: November 06, 2006, 05:07:10 PM »
Quote
I’ll just have to think of a way to fire those reactors at netload

Daniel,
Have a look at implementing IExtensionApplication and Initialize().
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Re: Ngen.exe
« Reply #5 on: November 16, 2006, 04:05:12 AM »

Quote
Have a look at implementing IExtensionApplication and Initialize().

Kerry, That did exactly what I needed! Thank you very much! All I needed to do was Initialize() the methods my reactors where calling (OleDbConnection calls) at Netload, Now everything is hunky dory