[issue37010] Review performance of inspect.getfullargspec

2019-05-22 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal, yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37010] Review performance of inspect.getfullargspec

2019-05-22 Thread mike bayer


mike bayer  added the comment:

thanks for creating this issue Nick!

--
nosy: +zzzeek

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37010] Review performance of inspect.getfullargspec

2019-05-22 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37010] Review performance of inspect.getfullargspec

2019-05-22 Thread Nick Coghlan


New submission from Nick Coghlan :

(Splitting out a separate performance issue from 
https://bugs.python.org/issue36751#msg342683)

There can be two quite different reasons for inspecting a function signature:

* inspecting arbitrary functions to learn as much about them as possible in 
order to present good coding hints and other guidance to a developer
* inspecting function and method implementations passed to a runtime API in 
order to call them correctly

inspect.signature focuses on the former use case, and as a result ended up 
being markedly slower than the simpler inspect.getfullargspec implementation 
that it replaced.

At the moment, inspect.getfullargspec is being kept around solely as a 
backwards compatibility API - it calls inspect.signature internally, but then 
throws away the rich objects that function creates, replacing them with simple 
Python builtins.

It seems plausible that we could reverse that relationship, and instead have 
inspect.signature use inspect.getfullargspec as a lower level API that produces 
less self-descriptive output, but also avoids creating a lot of instances of 
custom Python objects.

(Sample performance data can be seen in 
https://gist.github.com/zzzeek/0eb0636fa3917f36ffd887d9f765c208)

--
messages: 343186
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Review performance of inspect.getfullargspec
type: performance

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com