jedi icon indicating copy to clipboard operation
jedi copied to clipboard

jedi#show_call_signatures() and provider#python3#Call() taking 50s each to load for some python functions

Open jrbenriquez opened this issue 4 years ago • 1 comments

Here's a profile log which occurs with some python methods but most of the time its fast. I am able to replicate this every time even after first load with Django's model .save() method.

Just wondering if I can further breakdown and see those 47seconds so I can tell what is actually taking that long and eventually pinpoint the root cause?

For now, I'll just disable call signatures

Hope you can help me debug this better

FUNCTIONS SORTED ON TOTAL TIME
count  total (s)   self (s)  function
    3  47.848278             provider#python3#Call()
    2  47.846732  47.845757  jedi#show_call_signatures()
    2   0.092018   0.000186  <SNR>89_Lint()
    2   0.090228   0.000128  ale#engine#RunLinters()
    2   0.089700   0.000399  <SNR>129_GetLintFileValues()
    2   0.089192   0.000376  <SNR>129_RunLinters()
    8   0.088422   0.000258  <SNR>129_RunLinter()
   14   0.062443   0.000758  ale#python#FindExecutable()
   14   0.061251   0.032495  ale#python#FindVirtualenv()
    6   0.057768   0.000611  <SNR>129_RunIfExecutable()
    2   0.043069   0.000143  ale#Queue()
    6   0.036936   0.000086  ale#linter#GetCommand()
   25   0.035119   0.002775  <SNR>132_NeoVimCallback()
    6   0.030196   0.000897  <SNR>131_ExitCallback()
    6   0.028827   0.000293  ale_linters#python#flake8#GetExecutable()
    5   0.028176   0.000690  <SNR>129_HandleExit()
    9   0.028046   0.000151  ale#linter#GetExecutable()
 2003   0.025602             ale#path#Simplify()
    5   0.021658   0.000692  ale#engine#HandleLoclist()
    2   0.018774   0.000081  ale_linters#python#flake8#RunWithVersionCheck()

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
    3             47.848278  provider#python3#Call()
    2  47.846732  47.845757  jedi#show_call_signatures()
   14   0.061251   0.032495  ale#python#FindVirtualenv()
 2003              0.025602  ale#path#Simplify()
    3              0.014282  <SNR>107_SearchParensPair()
    6   0.009246   0.009212  ale#job#Start()
    1   0.005920   0.005895  <SNR>97_on_insert_leave()
   82              0.005592  lightline#link()
   11   0.007693   0.005530  ale#python#FindProjectRootIni()
   29   0.005217   0.004631  ale#path#Upwards()
  293              0.004031  ale#Var()
   25   0.035119   0.002775  <SNR>132_NeoVimCallback()
    5   0.004057   0.002485  <SNR>141_BuildSignMap()
    1   0.002530   0.002375  gitgutter#async#execute()
    5   0.002254   0.002076  ale#sign#GetSignCommands()
   17              0.001966  ale#GetLocItemMessage()
    5   0.002593   0.001843  ale#engine#FixLocList()
    4   0.002439   0.001758  ale#linter#Get()
    1   0.001804   0.001720  jedi#clear_call_signatures()
   17   0.002060   0.001703  <SNR>143_matchaddpos()

jrbenriquez avatar Feb 28 '22 01:02 jrbenriquez

How big is your Django code base? Because I'm working on a pretty big one and I do not experience this...

davidhalter avatar Mar 12 '22 12:03 davidhalter