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

calculate_hand does not execute immediately #103

Open
cirrusasf opened this issue Mar 17, 2022 · 9 comments
Open

calculate_hand does not execute immediately #103

cirrusasf opened this issue Mar 17, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@cirrusasf
Copy link
Contributor

Describe the bug
When I fire up calculate_hand without any argument, it takes a while to show up help information:
usage: calculate_hand [-h] [-v] out_raster vector_file
calculate_hand: error: the following arguments are required: out_raster, vector_file

@cirrusasf cirrusasf added the bug Something isn't working label Mar 17, 2022
@asjohnston-asf
Copy link
Member

How long did it take for the help message to eventually show up? Seconds, minutes, hours?

I believe @jacquelynsmale was also experiencing this issue with the water_map entrypoint last week.

@jhkennedy
Copy link
Contributor

Yes, this is a problem with the asf-tools container right now (I also meant to open an issue). It's order seconds but 10s of them.

I tried removing this to see if it helped and it does not:
https://github.com/ASFHyP3/asf-tools/blob/develop/Dockerfile#L15

@asjohnston-asf
Copy link
Member

@cirrusasf was seeing the delay in a local conda environment, suggesting it's not related to the Docker container.

@jhkennedy
Copy link
Contributor

Oh, interesting. I was only seeing it in the docker container the first time, and not locally for me. 🤔

@asjohnston-asf
Copy link
Member

See if bringing your local conda environment up to date introduces the issue? Could have been introduced by a dependency version bump.

@jhkennedy
Copy link
Contributor

jhkennedy commented Mar 17, 2022

Some timing notes:

Both of these commands:

calculate_hand --help
water_map --help

takes ~1.65 seconds in my environment which is fully updated

It's something about the imports in water_map.py and/or hand/caculate.py I think as it takes 0.04s to run:

python -c "import asf_tools; print(asf_tools.__version__)"

but the same ~1.65 seconds to run:

python -c "import asf_tools.water_map; print(asf_tools.__version__)"

@jhkennedy
Copy link
Contributor

On the docker side, the times are even worse the first time they are run ( run each right after a fresh docker run)

calculate_hand --help
water_map --help

takes ~31.5 seconds

python -c "import asf_tools; print(asf_tools.__version__)"

takes ~0.07 seconds

python -c "import asf_tools.water_map; print(asf_tools.__version__)"

takes ~31.5 seconds


The second time I run the above commands in a running container, the ~31.5 seconds times drop to ~3 seconds

@jhkennedy
Copy link
Contributor

And completely wiping my local conda environment and recreating sees the same thing as the docker container 31s the first time, 3 seconds the second.

@cirrusasf
Copy link
Contributor Author

I just tested it. it takes ~3 secs.

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

No branches or pull requests

3 participants