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

[Backport queued_ltr_backports] Raster - paletted: fix slow rendering with huge number of classes #57037

Closed

Conversation

qgis-bot
Copy link
Collaborator

@qgis-bot qgis-bot commented Apr 4, 2024

Backport #56784
Authored by: @elpaso

nirvn and others added 30 commits March 27, 2024 12:41
rows inserted/added was fired twice (once by the manager and once by the
model), confusing the proxy model.

Also count was wrong by 1 in beginInsertRows( parent, oldCount, oldCount + count )
and beginRemoveRows, but now these two calls have been removed completely.

Fix #56493
This behaves much nicer when row heights grow large, eg when
there's multiline content in a field or when json fields are
present
…ltValue

Previously we mixed invalid QVariant values with null QVariants,
resulting in a mix of results between Qt 5 and Qt 6 and across
different data providers
…ested (typically from QgsGeometryCollection::isValid())
…n initiated against editing-enabled vector layer
Avoid various errors in case of empty input layer, empty/null geometries, invalid geometries, linestrings with zero-length segments...
If we only have receieved the first part of a message, don't
emit stateChanged until we've received the rest.

Possibly refs #56460
…ecks in a foolproof way

The check for ``width * depth + 31`` not overflowing INT_MAX was done
after computing it, which would be undefined behavior if that happened.
Nowadays compilers can use "impossible situations" in smart ways, and
could very well discard the check if it is done afterwards. Be on the
safe sife and check before, as done in
https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/image/qimage_p.h#n89
These are cheap to construct by design, so we can avoid
storing them and the messy cross-class access to member
variables
This prevents a bug where the save action in the Python console
keeps defaulting back to the binary QGIS install folder
- Add some typehints
- Avoid creating an unnecessary local variable
This fixes UNC paths not identified as network paths.

By ensuring that a trailing slash for directories is passed
down to the identify function.
This is messy, as there's no way we can possibly make the current,
stable API of this class safe. We have to resort to an opt-in
"safe" mode which exposes a non-dangerous API.

This should hopefully fix issues where the qt event loop causes
destruction of the detected connection before listener slot is
called and is able to take ownership of the signal argument...
Use a single timer instead of the QTimer static method, so that
we can stop the timeout as soon as we receive valid data and don't
risk a race where unwanted timeouts are added to the event loop
while we're processing a valid detected connection
Otherwise we end up calling QgsGpsDetector::detected multiple times
for the same device, and if an external client has taken the
detected connection in the meantime then the detector will incorrectly
move to the next device and continue trying to make connections
This ensures that there's NO change of any remaining unwanted
interaction between the GPS detector and the connection which
it no longer owns after a call to takeConnection. Otherwise
when the detector outlives the "find a connection" logic we risk
status updates from the taken GPS device from triggering unwanted
detect-a-valid-connection logic from the detector.
nyalldawson and others added 9 commits March 27, 2024 12:41
Use the processing context's ellipsoid instead of a hardcoded
WGS84 ellipsoid for distance calculations during network
analysis, so that the lengths used will exactly match other
measurement tools used on the same features in the same
project.
A WFS request such as
`SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&SRSNAME=EPSG:4326` does
not invert the axis and return the coordinates in the LON/LAT
order. For example:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>2.358 48.865</gml:lowerCorner>
  <gml:upperCorner>2.37 48.876</gml:upperCorner>
</gml:Envelope>

However, the same request without a SRSNAME parameter inverts the axis
and returns the the coordinates in the LAT/LON order:

<gml:Envelope srsName="EPSG:4326">
  <gml:lowerCorner>48.865 2.358</gml:lowerCorner>
  <gml:upperCorner>48.876 2.37</gml:upperCorner>
</gml:Envelope>

With this change, the axis is not inverted if the SRSNAME parameter is
not passed. This way, this is the same behavior as
`SRSNAME=EPSG:4326`.

This is a follow-up of #45270.
Transform the "Opacity" value calculated by Data Defined Override expression from [0-100] range to [0-1] range.
This is an attempt to fix browser slowness when network
drives becomes unavailable.

Some QDir/QFileInfo call may become slow when called on
disconneced drives on windows, by calling them in the
init method (which is called by a separate thread and when
the driver is more likely to be available) the risk
to call them when they can become slow is drastically
reduced.

Whether this will help to reduce the browser slowness
on network drives it is hard to tell but it won't certainly
hurt.
@github-actions github-actions bot added this to the 3.38.0 milestone Apr 4, 2024
Copy link

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Apr 19, 2024
@elpaso elpaso removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Apr 19, 2024
@nyalldawson nyalldawson force-pushed the queued_ltr_backports branch 2 times, most recently from 8f685f9 to 4806cbb Compare April 21, 2024 02:12
Copy link

github-actions bot commented May 5, 2024

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label May 5, 2024
Copy link

While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist.

@github-actions github-actions bot closed this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Uh oh! Seems this work is abandoned, and the PR is about to close.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet