This project is read-only.

Ajax Call, Generic Handler, Too slow

Topics: Core, General
Jul 2, 2013 at 1:18 PM
Edited Jul 2, 2013 at 1:20 PM
Hi people

Really Need Help!

I have encountered with such a problem.

Needed to create a simple Ajax Call to a controller.
It was a very simple call. In a regular site it should have taken some 10s of milliseconds for response from the server.

But my case was too too slow. It took more than a second - as a usual web page.
That was not suited me at all so I had to find a remedy.

I found, having implemented a Generic Handler and now it works - it flies.

So the questions:
  1. Is it possible to make a call to a controller quicker at least for AJAX
  2. How is it possible to make a Generic Handler to accept IoC dependencies.
    Thanks God this time I coped without using injections but next time I do not know if I'll manage it.
Thank you for your great work!
Jul 2, 2013 at 3:17 PM
Edited Jul 2, 2013 at 3:17 PM
It's hard to say why your AJAX call to a controller takes so long. It should be as fast as invoking a Generic Handler (more or less - definitely not as slow as you're describing).
The cause of the slowness may be something else. Perhaps try a clean Orchard install with a simple module that has a single controller with a simple action that returns a simple view and compare.
Jul 2, 2013 at 6:05 PM
First of all I am very thankful to you for your quick response.
Secondly do you mean it could be my fault...?

I will definitely test a clean solution.
And why not, maybe I will find and other problems of mine which makes for example the Back office very slow too.

Thank your very much!
Jul 7, 2013 at 7:36 PM
No problem.
Yes, it could very well be something you did. It happens, you know. :)
Sounds good, let us know how it goes.
Jul 7, 2013 at 7:42 PM
Hi very grateful for your responsiveness!

Yes found... it was completely my fault.
Just a pure bug.

Really works fine as it must.
Thank you very much !
Jul 7, 2013 at 8:13 PM
Excellent. Glad you worked it out.