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

PR: Improve startup time in several ways #15857

Merged
merged 17 commits into from
Jul 4, 2021

Conversation

ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented Jun 13, 2021

Description of Changes

  • Use new lazy modules defined in Spyder-kernels for Numpy, Pandas and PIL to avoid loading them at startup. That also helps to simplify the code.
  • Call QApplication.processEvents before and during calling on_mainwindow_visible, so that users don't have to wait until those methods finish before seeing the main window.
  • Compute dependencies in a thread and after a 10 seconds delay to not block the interface at startup.
  • Avoid importing Matplotlib and Numpy at startup.
  • Don't compute stylesheets when importing their module.

Depends on spyder-ide/spyder-kernels#259

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @ccordoba12

@ccordoba12 ccordoba12 added this to the v5.1.0 milestone Jun 13, 2021
@ccordoba12 ccordoba12 self-assigned this Jun 13, 2021
@pep8speaks
Copy link

pep8speaks commented Jun 13, 2021

Hello @ccordoba12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 190:13: E731 do not assign a lambda expression, use a def
Line 481:13: E731 do not assign a lambda expression, use a def

Line 83:9: E731 do not assign a lambda expression, use a def

Comment last updated at 2021-07-04 16:03:54 UTC

@ccordoba12 ccordoba12 requested a review from dalthviz June 14, 2021 22:28
dalthviz
dalthviz previously approved these changes Jun 15, 2021
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @ccordoba12 👍

…thub.com/ccordoba12/spyder-kernels.git external-deps/spyder-kernels

subrepo:
  subdir:   "external-deps/spyder-kernels"
  merged:   "1362995de"
upstream:
  origin:   "https://github.com/ccordoba12/spyder-kernels.git"
  branch:   "delayed-modules"
  commit:   "1362995de"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"
…der-ide/spyder-kernels.git external-deps/spyder-kernels

subrepo:
  subdir:   "external-deps/spyder-kernels"
  merged:   "52ccb1b1a"
upstream:
  origin:   "https://github.com/spyder-ide/spyder-kernels.git"
  branch:   "2.x"
  commit:   "52ccb1b1a"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

[ci skip]
@ccordoba12 ccordoba12 changed the title PR: Improve startup time PR: Improve startup time in several ways Jul 4, 2021
@ccordoba12 ccordoba12 merged commit 281dc5e into spyder-ide:5.x Jul 4, 2021
@ccordoba12 ccordoba12 deleted the lazy-modules branch July 4, 2021 16:05
ccordoba12 added a commit that referenced this pull request Jul 4, 2021
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.

3 participants