-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
QgsVectorLayerExporter: RAM based logic to decide when to flush features #39440
Conversation
55544c6
to
41418a2
Compare
Looks great! Could we make the name "approximateRamUsage" to keep capitalisation consistency? |
|
We inherited qt's naming here (e.g. QDomElement), and try to keep consistency with that so that the API is more predictable. |
(but obviously "memory" works too!) |
41418a2
to
070a867
Compare
ok, renamed to |
070a867
to
8c6192e
Compare
Last thought: 10mb seems rather conservative to me. Would you be happy to bump this up? (A lot of workflows end up with memory layers of a couple of hundred mb, and I've not seen any issues reported regarding this |
Just give me your number :-) But a transaction with 10 MB is already quite large. Not sure that increasing that will improve perfs that much. |
100mb? 50 mb? |
8c6192e
to
1f29f4b
Compare
ok, amended to use 100 MB |
…sage() Flush when we have ~ 100 MB of features accumulated
1f29f4b
to
6ebbf27
Compare
Flush features when we have ~ 10 MB of them in memory.
This is a continuation of #39439 , which requires new core functions: QgsGeometry::wkbSize() and QgsFeature::approximateRAMUsage() . Not sure if this is 3.16 material