This project is read-only.

Content Type Shape and Dynamic Model Performance

Topics: Customizing Orchard
Jan 14, 2014 at 9:48 PM

I've got a case where I've got a content type with different fields defined on it via the Admin UI. I've got a shape defined that renders the contents of these fields, but performance on this view is abominable - 1+ seconds to process the view - and it looks like the bulk of time is being spent spinning through DynamicObject overloads looking for the part / field to bind to and returning the value.

The content type itself has around 30 fields defined on it. Any suggestions for improving performance in this case? Is there some way I can inject something in the rendering pipeline to expand these dynamic objects and build up a view model for the content item?
Jan 14, 2014 at 11:26 PM
Which Orchard version are you using?
Jan 15, 2014 at 3:11 AM
Orchard 1.7.2. Turns out though, that I was completely wrong - the use of the dynamic model with a ton of fields wasn't my problem. I'm having disk I/O issues due to the nature of the IMediaLibraryService interface, see issue #20421.

dynamic is a dog, but we're not doing anywhere near enough invocations to surface an issue.
Jan 15, 2014 at 12:20 PM
OK then.
Jan 15, 2014 at 2:39 PM
Shame on me for jumping to a conclusion!