Html.RenderAction Slowness

8 views
Skip to first unread message

Mat

unread,
Jun 24, 2010, 4:20:37 AM6/24/10
to Spark View Engine Dev
When using Html.RenderAction("Show","Navigation") from a view
(Index.spark) to load navigation widget the page Home/Index takes
1.08secs to load,

However if I change so that Navigation is included/loaded on primary
viewmodel HomeIndexViewModel (and thus no RenderAction call) it takes
45msec.

I tried numerous version of Spark and different scenarios, what is
going on?

Mat

unread,
Jun 24, 2010, 4:38:15 AM6/24/10
to Spark View Engine Dev
Reproduced this on an example project


MasterTemplate.spark - spark master tempalte file

some where in the markup add:

#Render.Action("Test","Home");

Keep it simple - do nothing:
public TestViewModel Test()
{
return new TestViewModel();
}


Without Render.Action page returns 15msec, with it returns
1.20seconds!

Using latest version from Teamcity codebetter (although it was same on
old version), asp.net mvc 2, .net 4.0.

Mat

unread,
Jun 24, 2010, 5:21:28 AM6/24/10
to Spark View Engine Dev
Okay its not a Spark bug, sorry

Its a bug in RenderAction, when you have 12,000 routes it takes ages
(where as the incoming request is routed handled very quickly)

http://aspnet.codeplex.com/workitem/6597

Rob G

unread,
Jun 24, 2010, 5:29:32 AM6/24/10
to spar...@googlegroups.com
Ouch! Good spot.

I haven't come across this because I don't tend to use RenderAction any more. Instead I use the built in Spark partial support to good effect and sometimes (for some pretty sweet async behaviour) I use the Spark render view using Javascript functionality. I done a post on how to use it here: http://blog.robertgreyling.com/2009/11/teaching-javascript-how-to-render-your.html

Hope that helps,
RobertTheGrey

--
You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
To post to this group, send email to spar...@googlegroups.com.
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spark-dev?hl=en.


Reply all
Reply to author
Forward
0 new messages