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

Very slow boot time on Mac app #2284

Closed
myeomans opened this issue Mar 28, 2015 · 34 comments
Closed

Very slow boot time on Mac app #2284

myeomans opened this issue Mar 28, 2015 · 34 comments

Comments

@myeomans
Copy link

Hi, I switched from windows to Mac recently and noticed that Spyder takes a very long time to start up when I try to open the program. I'm talking, like, 30min to maybe an hour or two sometimes. I still use it because it's a phenomenal program, but the long boot time is really annoying. It didn't happen on my old windows machine, so I don't know what the issue is. Any idea what's up? If there's a simple fix I'd love to know. I hate having to wait to use the console.

@ccordoba12
Copy link
Member

Questions:

  1. What Spyder version are you using?
  2. What Python version?
  3. How did you install Spyder?

We have a menu entry under the Help menu called Report a bug that will give us all this information (and more) when you report a bug here (since Spyder 2.3.3), so please use it next time that you have troubles.

@myeomans
Copy link
Author

myeomans commented Apr 2, 2015

Thanks for your reply, I submitted my issue using the "report a bug"
feature instead, that will be more helpful I think.

Best,
Mike

On Sun, Mar 29, 2015 at 2:28 PM, Carlos Cordoba notifications@github.com
wrote:

Questions:

  1. What Spyder version are you using?
  2. What Python version?
  3. How did you install Spyder?

We have a menu entry under the Help menu called Report a bug that will
give us all this information (and more) when you report a bug here (since
Spyder 2.3.3), so please use it next time that you have troubles.


Reply to this email directly or view it on GitHub
#2284 (comment).

@Nodd
Copy link
Contributor

Nodd commented Apr 7, 2015

I can't find the new issue ?

Instead of creating a new one, you can just open the page with spyder's menu and copy-paste the content in this one. Either way is fine !

@Nodd
Copy link
Contributor

Nodd commented Apr 7, 2015

It's a duplicate of #2171, right ?

@myeomans
Copy link
Author

myeomans commented Apr 7, 2015

Not a duplicate, though #2171 sounds very similar to my issue. I checked and can confirm that the % CPU does go to 100% in the activity monitor while I'm waiting (though my computer is multicore so the overall percentage in use is still modest).

The people in the other thread don't have to wait nearly as long to load as I am (10 minutes would be a dream at this point!) Mine is taking more like an hour or two. My splash screen takes a few minutes once it is up, but that doesn't bother me much. During the long wait before the splash, the program is giving me no indication that it's doing anything... Also I am running Yosemite 10.10.2, not Mavericks.

Once/if spyder boots today I will paste my report in this thread, as requested.

@myeomans
Copy link
Author

myeomans commented Apr 7, 2015

Okay, here's the bug report info:
Spyder Version: 2.3.2
Python Version: 2.7.8
Qt Version : 4.8.6, PyQt4 (API v2) 4.11.1 on Darwin
pyflakes >=0.5.0: 0.8.1 (OK)
pep8 >=0.6 : 1.5.7 (OK)
IPython >=0.13 : 2.3.1 (OK)
zmq >=2.1.11 : 14.4.1 (OK)
pygments >=1.6 : 2.0.1 (OK)
pandas >=0.13.1 : 0.15.2 (OK)
sphinx >=0.6.6 : 1.2.3 (OK)
psutil >=0.3 : 2.1.3 (OK)
rope >=0.9.2 : 0.10.2 (OK)
matplotlib >=1.0: 1.4.2 (OK)
sympy >=0.7.0 : 0.7.6 (OK)
pylint >=0.25 : 1.4.0 (OK)

@ccordoba12
Copy link
Member

@myeomans, please update to Spyder 2.3.4. I think I fixed this problem in 2.3.3.

@myeomans
Copy link
Author

myeomans commented Apr 8, 2015

Yeah, the update did it! Thanks so much!

@myeomans myeomans closed this as completed Apr 8, 2015
@ccordoba12
Copy link
Member

@myeomans, glad to know things are working fine for you again! :-)

@leonsuetfeld
Copy link

Unfortunately I don't think 2.3.4 fixes it.

I'm using a Retina MBP, OSX 10.10.3 and python 2.7. When I used Spyder 2.3.2 it would always take very varying amounts of time, say between 10 and 120 minutes, to start up Spyder.

I then switched to 2.3.4 and the problem SEEMED fixed, so it always started up within a few seconds. However, after a crash it all went bad again, now showing the exact same behavior as 2.3.2 did before. I think the may have been caused by me trying to open the variable explorer while the code was running - it seems to be very sensitive about that. I'm not sure though, don't remember exactly.

Bottom line is, something in 2.3.4 fixed it at first but now the problem is back.

@myeomans
Copy link
Author

Agreed with leonsuetfeld, the problem is back... though I didn't have any "crash" moment that changed things. I don't ever use the variable explorer, and rarely run a lot of code at once (i mainly use the interpreter to test out small things before I load them onto a python server). I'm not ruling out the possibility that I opened something that triggered the problem by accident.

@ccordoba12
Copy link
Member

Hi,

I need a reproducible test to fix this problem because I'm not seen it myself :-) For now you can try to run in a terminal:

spyder --reset

or

rm -Rf ~/.spyder2

to see if that fixes the problem.

@leonsuetfeld: what variable were you seeing when using the variable explorer?

@ccordoba12
Copy link
Member

@blink1073, are you seeing this problem in your machine?

@blink1073
Copy link
Member

I am not. 


Sent from Mailbox

On Mon, May 25, 2015 at 1:27 PM, Carlos Cordoba notifications@github.com
wrote:

@blink1073, are you seeing this problem in your machine?

Reply to this email directly or view it on GitHub:
#2284 (comment)

@leonsuetfeld
Copy link

What folder would I have to be in to execute the commands you suggest?

I think just re-installing the dmg file of spyder 2.3.4. may have done the trick. At least start-up time is back to what it should be (<10s), for now. So there probably is something that can go wrong after some time (or a spyder crash possibly), that can be fixed by re-installing spyder 2.3.4.

About the variable explorer: If you're referring to the time it crashed after which the problem may have occured for the first time: It didn't get to that point when it showed any variables. It crashed right after I requested the VE, since it wasn't happy about requests while executing code.

@ccordoba12
Copy link
Member

@leonsuetfeld, if you're using our dmg, you can't run spyder --reset (you'll be able to since Spyder 3.0 :-), but you can run rm -Rf ~/.spyder2 on any folder (using Terminal.app of course).

Glad to hear that your problem was fixed :-)

@zach-morris
Copy link

I put the same comment in a different thread of a similar problem, but I had this same exact issue. After a random crash of the application, it would take up to 10 minutes to start up. After looking at the Package Contents, I noticed that a file name 'pep8' was getting very large (over 1GB). After I deleted that file, my slow startup issue went away completely.

@myeomans
Copy link
Author

myeomans commented Oct 9, 2015

This problem still isnt' fixed. The program can run after installing for a month or two and then slows down dramatically at load. If I have to keep reinstalling the whole thing each time it starts freezing at the program load, that makes it very difficult to rely on long-term.

I found a few pep8 files in the directory but none of them were very big (all <100kB) so I don't think that's the issue in my case.

@myeomans myeomans reopened this Oct 9, 2015
@Cognitively
Copy link

Same here. Using 2.3.7 on OS X 10.10.5. I had to remove spyder and reinstall it. The older 2.3.7 Spyder.app was ~900MB, the freshly installed 2.3.7 is ~500MB

@zach-morris
Copy link

Just installed this on a new mac (10.11.2) and it looks like the same problem exists. I checked the app contents and found that the files pep8 and pylint continually are getting larger and larger in size.

Fresh install. Before launching Spyder, the file size was as follows:
pep8: 3kb
pylint: 3kb

Start spyder, the filesize jumps:
pep8: 5kb
pylint: 5kb

Restart the application. File sizes jump again:
pep8: 10kb
pylint: 10kb

After trying this a few times, I see these files are doubling in size every time I restart the application. I opened the files, and it looks like the file is just doubling the newlines/return carriages every time the application launches. Seems like it should be a simple fix.

@ccordoba12 ccordoba12 added this to the V3.0beta3 milestone Dec 11, 2015
@ccordoba12
Copy link
Member

@zach-morris, thanks for the update. I think I know what's happening, but I have to do some experiments to confirm it.

@ccordoba12 ccordoba12 modified the milestones: v3.0rc1, v3.0beta3 Feb 10, 2016
@ionoDORK3
Copy link

This is a significant problem for our research group. We must use Python 3.4 on MacOS X, which is part of the Spyder 2.3.7 release. As mentioned above, the pep8 and pylint files explode in size each time the Spyder IDE runs. We realize that this is an older version, but we would really appreciate it if this problem could be investigated and solved.

The release is:
URL: https://github.com/spyder-ide/spyder/releases
FILE: spyder-2.3.7-py3.4.dmg

Thanks.

@ccordoba12
Copy link
Member

@ionoDORK3, I'm sorry but I'm unable to produce more DMG's with Python 3.4 because it's not supported anymore in Homebrew.

You could Anaconda instead :-)

@myeomans
Copy link
Author

myeomans commented Mar 2, 2016

Is there any version that doesn't have this problem? I keep a DMG handy
to re-install spyder every few days when I'm using it.. This is about as
ugly a solution as it gets.

On Wed, Mar 2, 2016 at 11:19 AM, Carlos Cordoba notifications@github.com
wrote:

@ionoDORK3 https://github.com/ionoDORK3, I'm sorry but I'm unable to
produce more DMG's with Python 3.4 because it's not supported anymore in
Homebrew.

You could Anaconda instead :-)


Reply to this email directly or view it on GitHub
#2284 (comment).

@ionoDORK3
Copy link

  1. TO: ccordoba12
    We are stuck with this version of Spyder/Python.
  2. TO: myeomans
    Our only workaround (so far) is to copy small versions of the pylint and pep8 files into the Resources folder now and then. When those files are small, Spyder will come up quickly. I bet using the DMG does the same thing. Both solutions are not cool...

@myeomans
Copy link
Author

myeomans commented Mar 2, 2016

Right, exactly. our solutions are surely doing the same thing to provide
the temporary fix.

I don't want to be a complainer because Spyder really is a good programming
tool! But this one bug is what keeps me from recommending it to colleagues
who want to start using python themselves.

On Wed, Mar 2, 2016 at 2:22 PM, ionoDORK3 notifications@github.com wrote:

TO: ccordoba12
We are stuck with this version of Spyder/Python.
2.

TO: myeomans
Our only workaround (so far) is to copy small versions of the pylint
and pep8 files into the Resources folder now and then. When those
files are small, Spyder will come up quickly. I bet using the DMG does the
same thing. Both solutions are not cool...


Reply to this email directly or view it on GitHub
#2284 (comment).

@SjoerdOptLand
Copy link

Here, just deleting pep8, pylint and pylint.bak seems to unblock Spyder (it recreates them). Is deleting these files harmful in any way?

@ccordoba12
Copy link
Member

You won't be able to use our integration with those libraries, but there isn't harm in removing them because they are not core functionality for Spyder :-)

@hdj
Copy link

hdj commented Jun 4, 2016

I also encounter the same problem. The size of pep8, pep8.bak and pylint are getting larger and larger in size and it takes a long long time to open spyder.
By following the solution mentioned above, I delete the pep8, pep8.bak and pylint.
The Spyder becomes normal again.

I install spyder by using spyder-2.3.8-py2.7.dmg. My OS version is 10.11.5
Hope this information can help the authors to improve the spyder.

@ccordoba12 ccordoba12 modified the milestones: v3.1, v3.0rc1 Jun 9, 2016
@ptoche
Copy link

ptoche commented Jul 15, 2016

Great tip SjoerdOptLand!

Problem: slow startup or spyder gets stuck starting up.
Solution:

  1. Go to spyder.app
  2. Show package content
  3. delete pep8, pep8.bak, pylint and pylint.bak (these files are greater than 100MB each)

@ccordoba12
Copy link
Member

I finally found the problem with this issue. It'll be fixed when I release new DMGs along with Spyder 3.0.1 :-)

@goanpeca
Copy link
Member

What was it ?

@ccordoba12
Copy link
Member

This function:

https://github.com/spyder-ide/spyder/blob/master/create_app.py#L173

which is added to the the file that boots our Mac app, was adding new, empty lines to its pep8 and pylint scripts every time Spyder was started. And that was making those script to increase in size and become really big files in very short time.

@goanpeca
Copy link
Member

👍

@ccordoba12 ccordoba12 changed the title Very slow boot time on Mac Very slow boot time on Mac app Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests