-
Notifications
You must be signed in to change notification settings - Fork 133
Description
I want to make backwards incompatible changes in line-profiler in order to improve the new-user experience and generally streamline usage.
I'm making the issue to record these ideas and invite discussion before any changes are made.
Off the top of my head as I'm writing this I'm thinking:
-
Deprecate cProfile / pstats usage. I don't see a use case for this library. If anyone is using pstats please let me know and we will keep it, but make it opt in instead of the default. The new default should be line-by-line=True and builtins=True. (Maybe in 5.0 we should warn that this change will occur if the user does not specify
-l, and in 6.0 make-linto a no-op that warns it will no longer be needed and will result in an error in the future). -
The skip-zero option should default to true.
-
The help text to print out the results of the lprof file info should always show even if you are summarizing. Also when summarizing with kernprof the results should be sorted by time. They currently do not seem to be. Not sure why that is, that could be fixed in a 5.x branch.
-
We will keep the kernprof script both for backwards compat, but also to recognize the R Kern's contribution to the Python ecosystem by creating this package, but I think we should alias it and make
python -m line_profilerthe default entry point and also addline_profilerorlineprofscript to make it more clear that this is a cohesive package. This means thatpython -m line_profilermain should become modal depending on if it is summarizing a lprof file, or running a script. Will have to think about the right design for this. I think it is important to ensure that usage is very concise and the user gets something interpretable and expected with minimal boilerplate. (Unify kernprof and python -m line_profiler #386) -
Rewrite the README and docs to be streamlined.
-
Add internal benchmarks to identify performance regressions. (see Worst-Case Overhead Increase Since 4.1.3 #375)
-
Consolidate the 3
__version__attributes intoline_profiler.__init__(part of the consolidation of kernprof and line-profiler clis).