-
Notifications
You must be signed in to change notification settings - Fork 77
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
GInga takes ages to load #644
Comments
How did you start it exactly? And which versions of Ginga and Astropy do you have? Are you doing something custom in your |
I started it just with
(also happens without any command line arguments) Versions:
No customization; not loading anything. There was a |
Using the following versions, mine started up in 3 seconds. Log:
And here my Qt info:
p.s. That datacube-like dimension log entry apparently appears even when I don't start it with any datacube. Sorry for the noise. |
I guess the delay comes from the modules loading: this happens serially, and each module takes about 2 seconds to load. The CPU is not used here, so each module seems to have a builtin wait somewhere. |
There are no explicit waits in the modules. Is it possible for you to test in a different environment (e.g. miniconda)? For me startup is less than 3 sec with python 3 on Ubuntu 16.04 (native libs or miniconda) and similar on Mac OS X 10.11.6 with miniconda. Is it possible that it is recompiling python 3 source each time? Even so, it should not be 30 sec. |
Further investigation shows, that during startup, ginga tries to connect to some hosts:
The first is an STSCI host (ssbwebv1.stsci.edu); but the other look weird to me. When I disable networking, ginga starts quickly, so the connection delay seems to be the cause. |
Huh, Ginga should not be trying to connect to anything at STScI. @jhunkeler or @rendinam , do you know what ssbwebv1 is serving? |
I'm not able to detect any network activity from ginga during startup in a packet capture.
As a sanity check, I am able to see network activity originating from ginga when I select "Help --> Documentation", as this loads a web page. Could the network activity you're seeing be originating from some other process? I also noticed a lag of ~10s or so in startup on the first run of ginga. No network activity detected, but on subsequent starts ginga came up much faster (< 2s). |
It is the ginga Python process:
|
Thanks for the output. The first version I ran was ginga as distributed as a conda package from the Astroconda channel. Then I noticed that you are running the system version, so I installed that. Sure enough, the ginga that ships as a Debian package creates network connections upon startup. Investigating further... |
In the network traffic produced during startup of the Debian version of ginga, some HTTP requests are made to a host The conda environment for ginga 2.7.0 contains |
Huh. AFAIK |
Okay, I think I have a suspect! Plugin docstring (e.g., https://github.com/ejeschke/ginga/blob/master/ginga/rv/plugins/Mosaic.py#L636) tries to pull in those examples using https://github.com/ejeschke/ginga/blob/master/ginga/util/toolbox.py#L135 for documentation. Would adding |
Copying the contents of ginga's If the .deb build can be persuaded to include the package_data directories specified in |
Great work everyone!
@olebole, I just checked by doing a fresh install and the config files are installed to the package area. Can we do as @rendinam suggests above? That would seem to be the straightforward solution. |
This should probably also be addressed. @pllim, I assume we are using an |
That is correct. |
When #645 is merged, you should not run into this issue anymore. However, if you try to generate doc manually, plugin docstring will be incomplete (minor inconvenience). Also FWIW, the tarball distributed by PyPI does already include |
From the installed package? That's probably ok. I think we eventually want to install the documentation at install time, if possible. |
Oops, didn't mean to close this yet. |
Merged #645, so this should take care of the main issue reported. |
In Debian, the examples are in |
Debian packages have usually a few minor changes; for GInga they are kept here. I update them with a new version, so from your side nothing is needed. As you can see, the changes are rather trivial and Debian specific. |
@olebole, interesting link. Maybe @pllim can comment on whether BTW, browsing that link, I'm led to a question that you might be able to answer. Is there a good generic function for locating scalable fonts in Linux (or at least Debian-based distros)? |
@olebole , what is the motivation for having the config files in Anyway, I don't see problem for you to |
These are not the config files, but the examples. In Debian, examples belong to the package documentation and therefore should be located in |
(Python 3) When I start ginga, it shows a blank screen for ~30 seconds, before it is actually ready to go.
The full log is attached.
ginga.log
The text was updated successfully, but these errors were encountered: