Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Partials rendering overhead #213

Closed
dimitarkolev opened this Issue · 7 comments

2 participants

@dimitarkolev

Hi when using partials in an eco layout there is huge overhead. It goes like this. If you put

<% console.log @document.url %>

Inside the layout its called twice for each document. But when partial is used

<%-@partial('test.html.eco', {parent: @documen.url})%>

And inside partial file you put

<% console.log @document.parent %>

The results is 10logs for each document from the partial. Using partials for large sites (100 pages) results in increase of the render time from 1s to 1min.

@balupton
Owner

Hrmmm, performance can definitely be improved.

For a little background, each time we render something, we render it twice. The second time is so anything that references it, will have the rendered content, not the source content.

I'm not sure why you would be getting 10 logs however. Will look into it.

@dimitarkolev

I dont think this is a performance issue its more likely that partials are rendered unnecessary multiple times on different points of the rendering process.

@balupton
Owner

Scheduled for June.

@dimitarkolev

Do you want me to prepare test project that illustrates the problem

@balupton
Owner

Yeah that'll be great :)

@balupton
Owner

@dimitarkolev can you let me know if v6.0.6 improves on the speed here at all? In term of differential rendering, I've noticed tremendous speed improvements. Would love to know if it resolves the performance problems here too.

@balupton
Owner

Closing. Feel free to re-open if is still an issue.

@balupton balupton closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.