This project is read-only.

FileResult Action slow performance when INotifier.Add executes

Topics: General, Troubleshooting
Dec 29, 2011 at 6:04 PM

Hi, i have a weird behavior with Orchard (tested with version 1.3.9 and 1.3.10). I Have a controller like this one:

public FileResult Get(string filename)
	/* ... LOAD STREAM CODE ... */

	return new FileStreamResult(somestream, "image/jpg");

That action is mapped to some URL like http://server/image/9348097970790.jpg

When the browser request ten or twenty different images at the same time (suppose you have a page with this amount of <img> tags), they return in parallel as expected (saw with the Google Chrome Network tool), but after navigate to other page that executes some Notifier, for instance _services.Notifier.Information(T("Some text")) and return to the images page, all the requests returns in sequential order; i mean each image takes longer to load (200ms, 600ms, 1.2s, 1.4s, etc...). The Action Method is fast per se. When i run the Visual Studio Profiler, i get that the problem is with the post processing of the action (EndProcessRequest in Orchard.Mvc.Routes.ShellRoute.HttpAsyncHandler).

Of course if i use OutputCache the problem disappear but i don’t want to use OutputCahe, instead i want the same performance before and after INotifier.Add executes.

¿This could be a bug? ¿Any workaround?

Jan 6, 2012 at 6:33 AM

It would be interesting to dig deeper into this one. Did you compare the responses? Are they identical in both case?

It might also be interesting to file a bug with a simple repro if possible.

Feb 2, 2012 at 5:07 AM

Hi BertrandLeRoy,

First of all, sorry about the response delay but i havent receive any email alert from codeplex regarding your answer (i should review my email alerts settings now).

Anyway, i filled an issue in with a simple custom orchard module to reproduce this issue. 


Feb 2, 2012 at 5:10 AM