7 Commits

Author SHA1 Message Date
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
0c41c22343 Fix bad merge 2024-05-24 16:34:33 +10:00
Nyall Dawson
6185675c93 Additional shortcut to QgsAttributes creation from Python
Avoid constructing a bunch of default QVariant objects which
we will just replace immediately
2024-05-24 16:34:33 +10:00
Nyall Dawson
8941bbf599 Optimise QgsAttributes python constructor
Avoid multiple checks for detachment for each attribute
2024-05-24 16:34:33 +10:00
Jean Felder
0446f85409 qgsattributes: Optimize QgsAttributes python allocation
The python `QgsFeature.setAttributes()` calls is relatively slow
because of the call to `sipConvertToType` which needs to make in
intermediate allocation for each attribute QVariant creation.

This change aims to speed up this call by avoiding the call to
`sipConvertToType` for the most common types.
The change itself is quite simple. If the input attribute is a
boolean, an integer, a string or a floating, a QVariant is directly
created by using the python C API instead of calling
`sipConvertToType`.

Based on some testing on lists which can contain between 5 and 10
elements, I have measured an acceleration up up to 70%.
2024-05-23 05:15:16 +10:00
Julien Cabieces
7f586d8742 PyQt6 sip files 2023-12-13 05:36:44 +10:00
Julien Cabieces
bb3c36a69b Initialize sip bindings for PyQt6
use exactly the ones from PyQt5 so we can study the difference when
generating for PyQt6
2023-12-08 03:38:42 +10:00