Skip to content
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

[BUG] - CLI takes a long time to load #1506

Closed
FFY00 opened this issue Oct 25, 2022 · 3 comments · Fixed by #1509
Closed

[BUG] - CLI takes a long time to load #1506

FFY00 opened this issue Oct 25, 2022 · 3 comments · Fixed by #1509
Labels
type: bug 🐛 Something isn't working

Comments

@FFY00
Copy link
Contributor

FFY00 commented Oct 25, 2022

OS system and architecture in which you are running QHub

Arch Linux

Expected behavior

CLI should not take much time to load -- should be virtually instataneous.

Actual behavior

$ time qhub --help
usage: qhub [-h] [-v] {deploy,render,init,validate,destroy,support,upgrade,keycloak,cost-estimate} ...

QHub command line

positional arguments:
  {deploy,render,init,validate,destroy,support,upgrade,keycloak,cost-estimate}
                        QHub - 2022.10.1.dev0

options:
  -h, --help            show this help message and exit
  -v, --version         QHub version number

________________________________________________________
Executed in    3.51 secs    fish           external
   usr time    1.05 secs  418.00 micros    1.05 secs
   sys time    0.17 secs   64.00 micros    0.17 secs

How to Reproduce the problem?

I just cloned the repo and installed the project from source.

Command output

No response

Versions and dependencies used.

No response

Compute environment

No response

Integrations

No response

Anything else?

No response

@FFY00 FFY00 added the type: bug 🐛 Something isn't working label Oct 25, 2022
@FFY00
Copy link
Contributor Author

FFY00 commented Oct 25, 2022

Profiler output:

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      158    0.005    0.000    4.735    0.030 __init__.py:1(<module>)
        2    0.001    0.001    3.811    1.906 initialize.py:1(<module>)
   1781/1    0.005    0.000    2.781    2.781 {built-in method builtins.exec}
        1    0.000    0.000    2.781    2.781 <string>:1(<module>)
        1    0.000    0.000    2.781    2.781 runpy.py:199(run_module)
   1918/5    0.007    0.000    2.757    0.551 <frozen importlib._bootstrap>:1022(_find_and_load)
   1917/5    0.006    0.000    2.757    0.551 <frozen importlib._bootstrap>:987(_find_and_load_unlocked)
   1826/6    0.006    0.000    2.756    0.459 <frozen importlib._bootstrap>:664(_load_unlocked)
   1746/6    0.003    0.000    2.756    0.459 <frozen importlib._bootstrap_external>:877(exec_module)
   2107/6    0.001    0.000    2.756    0.459 <frozen importlib._bootstrap>:233(_call_with_frames_removed)
   257/15    0.001    0.000    2.746    0.183 {built-in method builtins.__import__}
        1    0.000    0.000    2.676    2.676 runpy.py:103(_get_module_details)
        2    0.000    0.000    1.753    0.876 api.py:62(get)
        2    0.000    0.000    1.753    0.876 api.py:14(request)
        2    0.000    0.000    1.749    0.874 sessions.py:500(request)
        2    0.000    0.000    1.741    0.870 sessions.py:671(send)
        1    0.007    0.007    1.404    1.404 utils.py:406(set_qhub_dask_version)
        6    0.000    0.000    0.982    0.164 models.py:887(content)
       22    0.025    0.001    0.982    0.045 {method 'join' of 'bytes' objects}
      366    0.001    0.000    0.957    0.003 models.py:812(generate)
      366    0.001    0.000    0.956    0.003 response.py:606(stream)
      364    0.004    0.000    0.955    0.003 response.py:776(read_chunked)
      416    0.003    0.000    0.797    0.002 socket.py:691(readinto)
      416    0.003    0.000    0.792    0.002 ssl.py:1263(recv_into)
      416    0.002    0.000    0.788    0.002 ssl.py:1121(read)
      416    0.786    0.002    0.786    0.002 {method 'read' of '_ssl._SSLSocket' objects}

@iameskild
Copy link
Member

Thanks @FFY00 for fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants