-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
[Performance Issue] Array methods duplicate Variant param or Callable take ownership when it could not. #790
Comments
The argument is not However, there are possible alternatives:
|
Yes, this is definitely planned. There are thousands of generated APIs that currently take value where they don't have to, also for |
I've started working on this btw, this does require changing things in several places to make sure it's used everywhere it's appropriate. To make this work for |
From Performance Investigation
Calling set and many other methods of
Array
withVariant
arguments clones theVariant
.Example:
The set will call internally:
which will do
to_variant()
, even though the argument is already variant. There are multiple such cases throughout theArray
class.Calling
callv
:Takes ownership of VariantArray. It might seem small thing, but for my use cases, i make about 10000 or more calls using callv. Allocating the array every time takes about 100-150ms of a 4s timeslice. I would like to be able to reuse the array. Eg. send it to the callv method, and after the method is called be able to reuse my array:
The text was updated successfully, but these errors were encountered: