Skip to content

Adding a network file vector layer ends with a lot of server calls for the same data #63407

Description

@MichaelBitard

What is the bug or the crash?

We have a GeoJSON rest server.

If we curl our server (https://api.preprod.camino.beta.gouv.fr/titres?domainesIds[]=s) we end up with a FeatureCollection containing 30 features.

When we put this URL in the source vector

Image

We can see new options appearing, showing that it understood the URL and was able to get the content.

As soon as we hit the add button, we notice on our server 9 (😱) sequential identical requests.

With only 30 features it's not really a problem on QGis, but if we query all our data (like our users like to do...) (https://api.preprod.camino.beta.gouv.fr/titres), we have 5552 features, it takes 1-3 seconds per request to get these features.
We now have QGis completely frozen for 30 seconds.

And it gets worse, if we ctrl+click on the newly added layer, it freezes again, does 5-6 identical requests to our server before displaying the menu.

We don't understand why it would do more than 1 request. It gets all the data on the first call.

Steps to reproduce the issue

  1. Go to 'Layer' / 'Add Layer' / 'Add Vector Layer'
  2. Select Source Type 'File'
  3. In the Source Vector Dataset(s) textfield, paste https://api.preprod.camino.beta.gouv.fr/titres (Don't type it, as it will try to fetch everytime you type a character, and it's horrible)
  4. Click on the 'Add' button
  5. The new layer should appear almost immediately (you can look into the outgoing requests made by QGis to see that a lot of similar requests are made sequentially) but instead freezes for at least 30 seconds.
  6. Ctrl+click on the new added layer
  7. The interface freezes again (a lot of outgoing requests are made by QGIs to our server)

Versions

3.44.3-Solothurn

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

This is part of an old issue (#49559) it is worse than before though (a couple years ago, only 3-4 requests were made, now we are at 9).

That may be due to the 'File' Source type, since we do not have the 'Protocol HTTP(S), cloud' Geojson support anymore

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!Data ProviderRelated to specific vector, raster or mesh data providers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions