Skip to content

huge performance-penalty when using extends/partials vs. inline rendering #500

@mugwump

Description

@mugwump

I just converted an inline-rendering example to using partials:

collection @elements
attribute :id, :subject, :description, :project_id, :parent_id

node ...
node ...
....

where the code was inlined into the collection-view, to using partials:

collection @elements
extends "element/element"

which yields the exact same output, but the performance drops drastically with huge collections:

from

Completed 200 OK in 680ms (Views: 318.7ms | ActiveRecord: 22.9ms)

for the inline-view

to

Completed 200 OK in 2267ms (Views: 1919.2ms | ActiveRecord: 22.6ms)

for the views using extends.

Anything I can do about it?! Anything I need to cache here? Are the partials re-read for every item in the collection??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions