0

I'm developping based on a API of a .net CMS.

Now I create my own class with some code.

Whenever i re upload my class... it takes so long for recompiling or reloading the website.

Is it possible to prevent compiling the other basic classes which I have not touched and not reuploaded and just the new uploaded?

Thank you.

1
  • 1
    such a stupid question, wa :)? Commented Dec 3, 2009 at 11:13

1 Answer 1

2

.NET is compiled language so you cannot "compile" just some classes. But you can precompile whole site after you add some files, that can speed up "cold start", so it would not need to be precompiled on first visit. If you're using "Publish" tool in VS, you can add Post build event which calls precompiler on published location. You will always experience longer start time on first access, you cannot avoid that. At least I don't know how...
Second option is ngen.exe, which will create native image from your IL-based .net managed code, and reduce startup time (on first request, .net will see this native image and just execute it). But with using ngen.exe you are loosing some runtime optimization, because ngen must "play safe", so SSE and similar optimization are not possible. It is recommended to perform performance profiling on using ngen.exe, in some cases app will perform slower!

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you. ok, so I have to create a dll of my class and throw it to bin folder. , correct?
that's correct. On first request site will be recompiled because new dll, or you can start precompile script on your own.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.