Skip to content

[experimental] Profile methods of view class #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PetrDlouhy
Copy link
Contributor

@PetrDlouhy PetrDlouhy commented Jan 16, 2021

This is experimental and unfinished code, which adds profiling of all methods of view class. The PR contains commits from #17, but I can also rebase them out. This functionality is much simpler than the whole changelog - only the last commit.

I wanted to know more about my views timing, so I also runtimes of the view functions:
Snímek z 2021-01-16 16-28-18

It is not perfect yet - for example the view has to be executed twice in order to patch the class correctly. I am not sure how to solve this, but I also didn't give it much time yet.
Also it probably doesn't work for function base views, but I don't think it would be such problem to fix it.

I know, that this might be out of scope of this DJDT panel, but I would also don't want copy the code out of this package, because most of the code is shared. I also didn't find other DJDT panel with this functionality - the profiling panels I found were hard to set-up and did produce very complicated and unclear output.

So what do you think? Should this be made into this panel (which would then be view-profiler rather than template-profiler)?

@PetrDlouhy
Copy link
Contributor Author

BTW the @profile_temlate decorator can be used on any other function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant