QGIS project import runs off the window, with progress and Cancel
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
Research direction
Start by reading the import command and the existing background execution paths, especially workflows::ahead_on_copy, reads::prepare, and service.add / layer.addData. Compare the proposed read-ahead and session-copy approaches, then add the import to long_commands in crates/engine/src/tests/cancellation.rs and extend the cancellation tests. Done means import progress and Cancel work without holding the window, cancellation leaves the session unchanged, and the cancellation tests cover the command.
Written by the indexing model from the issue text.
Description
project.importQgis runs on the UI thread. It adds a project's layers one after another, each through the command that adds its kind, and no step looks at Cancel. Since #2471 a QGIS project's web service layers come in from their services: each asks for the service's capabilities, then a WFS, OGC API or feature service layer's features (page by page, within the read limits) or a WCS coverage. A project with several such layers, or a slow service, holds the window until every service has answered. Before #2471 only file reads and a WMS layer's capabilities did this.
What's wanted (AGENTS.md, "Never hold the window"): the import runs off the window, with progress (layers done of layers in the project) and Cancel. Cancelling leaves the project as it was, as other cancelled commands do.
Why it isn't a small change:
- The import changes the session as it goes. Later layers, groups and relations read the layers added before them, and tile layers that land on the same tiles are merged.
- There is no background path yet for a command that runs other commands on the session. Models and scripts run on a copy (
workflows::ahead_on_copy), whose results are then taken. Read-ahead commands (reads::prepare) read one source before they run.
Possible approaches:
- Read ahead. Collect every file and service read the import will make: each layer's source is known from the project text before anything is added. Read them all off the window with progress and Cancel, then add the layers from what was read, as
service.addandlayer.addDataalready take fetched documents and files. - Run on a copy. Run the import on a copy of the session, as models and scripts do, and take its result.
The import would then also go in long_commands (crates/engine/src/tests/cancellation.rs), and the cancellation tests would cover it.
Related: #882 (piece 10b, #2471).
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 268
- Avg merge
- 11h 1m
- Merged PRs (30d)
- 942
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opengeos/RustGIS
-
[Bug]: layer.move to the place a layer already has fails and stops a script; with several layers it leaves an empty undo stepPossibly taken @jgregoriorincon claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opengeos/RustGIS#2621 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
opengeos/RustGIS#1446 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
All issues in opengeos/RustGIS
Similar issues
-
postgresql-rules / queue-rules: implicit KEY SHARE before a parent key update, and job self-overlapOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jonathanong/no-mistakes#3879 ·
Maintainers usually reply within 1 day
-
area:index v0.35.0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
nautechsystems/nautilus_trader#5741 ·
Maintainers usually reply within 1 day
-
RunPlugin derives Hash over all fields while PartialEq compares only location and configurationOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
zellij-org/zellij#5969 ·
Maintainers usually reply within 1 day
-
eth_get_proof reports another account's fields for an absent accountPossibly taken @Indian-boult claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day