[
https://issues.apache.org/jira/browse/IGNITE-2946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15448963#comment-15448963
]
Igor Sapego commented on IGNITE-2946:
-------------------------------------
Vladimir,
1. Good catch. I believe, .NET changes have been lost during re-merge.
2. Well, it's either that or manual new/delete, as we can not use auto pointers
in exported class. Maybe we should add our own implementation of auto pointers.
Changed for manual new/delete for now.
3. If we do that this way this is going to invalidate all {{QueryFieldsRow}}s,
which is breaking backward compatibility.
4. I prefer it in a separate class as it more clean to me. If we put it into
{{QueryImpl}} itself then we would need to re-create stream and reader every
time we get a new memory chunk, which is 2 memory allocations instead of 1. But
I agree with the performance concerns. I've changed shared pointers to plain
references. This seem to be ok as the lifetime of batches is <= lifetime of the
cursors.
{quote}
Ideally there should be no heap allocations at all after we constructed a
QueryImpl instance. The only exclusion to this rule is memory chunk, which
should be allocated 1 time on first batch access.
{quote}
As I said, this is going to break backward compatibility. In this case every
{{GetNext}} call on cursor may invalidate all existing query rows. If we are
fine with that then I can do that.
> CPP: Method GetNext() of the cursor classes should be optimized.
> ----------------------------------------------------------------
>
> Key: IGNITE-2946
> URL: https://issues.apache.org/jira/browse/IGNITE-2946
> Project: Ignite
> Issue Type: Task
> Components: platforms
> Affects Versions: 1.5.0.final
> Reporter: Igor Sapego
> Assignee: Igor Sapego
> Labels: cpp, performance
> Fix For: 1.8
>
>
> Current implementation of the GetNext() method of the cursor classes is too
> slow and should be optimized.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)