Array optimisation for variablesRequest #343
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @jonahgraham ,
As we discussed the issue previously, this is an update to optimising the array read operation in the
variablesRequest
.Recently, there are some redundant operations performed during the
variablesRequest
in the adapter, causing a performance issue while retreiving larger arrays. The operation, which is removed in this update, creates O(n) compexity in the read operation in terms of gdb communication. With this update, by removing this redundant logic, gdb communication complexity is going to decrease to O(1).Update tested manually in 1-dimensional int array, 2-dimensional int array, 1 dimensional struct array and 1-dimensional struct contains 1-dimensional array element. We observe the increase in the performance without having issue on the read operation.
Could you please review this update when you are suitable?
PS: Besides the removal of the array logic, the
this.getFullPathExpression
is also replaced since still causing an expensive gdb request which affects the performance.