has anyone audited/benchmarked the performance and memory footprint of the different view registration types against one another?

34 views
Skip to first unread message

Jonathan Vanasco

unread,
May 10, 2016, 12:47:10 PM5/10/16
to pylons-discuss
I know that `@view_config` has an initial hit on startup, but I am interested in anyt overall performance differences.

I set up a quick informal test with 200 routes/views, and the only noticeable difference was that using the `@view_config` decorator added (approximately) a 1MB overhead to the memory footprint.

The execution speed had no difference outside a margin of error.

Has anyone else done testing on this?

Bert JW Regeer

unread,
May 10, 2016, 1:23:59 PM5/10/16
to pylons-...@googlegroups.com
@view_config is only used at startup. After that everything is in the registry, then things perform exactly the same as if you were using config.add_view.

The venusian scan is the only thing would take any appreciable time to read all the files.

There is no additional overhead between the two.

Bert
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
> To post to this group, send email to pylons-...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/4e492caf-4643-445c-8e5b-eaaed10cf862%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jonathan Vanasco

unread,
May 10, 2016, 2:00:19 PM5/10/16
to pylons-discuss


On Tuesday, May 10, 2016 at 1:23:59 PM UTC-4, Bert JW Regeer wrote:
There is no additional overhead between the two.

The `@view_config` decorator creates a wrapped function - which is the small hit to the memory footprint.

The source shows the decorator registers + returns the underlying (unwrapped) function, so I wasn't expecting a difference but wanted to make sure.
Reply all
Reply to author
Forward
0 new messages