Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does the compiling work exactly?

Status
Not open for further replies.

Ovatvvon

Programmer
Feb 1, 2001
1,514
US
I've been reading up on how the ASP.NET workes with it's compiling. It says if the page is being run for the first time since it's last change, it'll be compiled (which is why they seam to take just a bit longer to load the first time you hit a page), but after that it's working with the already compiled code until it's changed again.

What I'm wondering is...is this more along the lines of how cache works? Does the page compile the first time for each person....or does it compile once on the server and for every user after that, it serves the compiled code to everyone until the next change to the document? -Ovatvvon :-Q
 
Good question Ovatvvon! Unfortunately I don't know the answer but am looking forward to one. [peace]
 
I'm pretty sure it compiles the 'application' -- so it is compiled for any request to it. Kind of like the difference between session and application variables. It will stay compiled until the document is changed or the server is rebooted.

Sorry for the lack of technical information, but its an answer :) [smurf]
01101000011000010110010001110011
 
There are actually two levels of compilation that occur. The first is the compilation that you do in VS.NET or with the command line interface.

The second is called a JIT (Just In Time) compilation and it happens on the first request made to the page after the initial compilation.

Actually, the JIT compilation will happen after the first compilation AND if IIS is restarted.

What's the difference? I couldn't give a good enough explanation, so I'll defer to someone else who might be able to.

Here's some more info, though... although MS was lacking (IMHO) in adding an option to have VS go ahead and do the JIT compilation so that your first user doesn't have to wait around for that to happen, there is a bit of a workaround for this. They have bundled with VS an application called 'Microsoft Application Test Center' and it's supposed to be used to test an application (go figure). Throughput, pgs/sec, etc...

Well, you can set that thing up to hit all of your pages one time... and that will do your JIT compilation for you so your users don't have to wait. Just remember to do it if IIS has to restart for some reason.

As far as the end product, member hads was on the nose that the entire application is compiled into one .dll file (find a .dll in your /bin directory with the same name as your application -- that's the one) so that each of your pages are actually member functions of the overall class, which is your application.

hope that helps! :)
paul
penny1.gif
penny1.gif
 
Is it supposed to compile it automatically to the bin directory? Or am I supposed to do that manually. It would make sense to me, and from what it sounds like you both are saying, that it does it automatically, however my bin directory does not contain a .dll file.


And this .dll file was supposed to be placed by the JIT compilation? (If I understand right)

I'll run a search on MS's sites for the "Microsoft Application Test Center" program. Thank you for bringing that to my attention.

-Ovatvvon :-Q
 
No, the .dll is actually made when you compile the application. Sometimes it won't show it in VS, though, if you don't have the "Show all files" option on. However, if you browse to the folder and look, it should definitely be in there. I don't know how it could work if it isn't.
penny1.gif
penny1.gif
 
I don't know how it's working then either...unless it's just not compiling it. You can go to that link above...I've aloud directorying browsing on it so you can choose the bin folder and see it's not there, even if you execute the aspx page which is nothing more than a text box inserting your input value into a label...(goin through a book right now learning aspx)

The fact that I'm not using vs doesn't have anything to do with it...does it? (just using notetab (like notepad))

-Ovatvvon :-Q
 
Well, yes... actually. If you're not using VS, then I assume you're using the command line to compile your project. You have to specify a path and file name when you compile... that's where it'll be.

In fact, just search the computer for [projectname].dll to see what you come up with.
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top