xfeatures2d: reduce test avg memory consumption#3722
Merged
asmorkalov merged 1 commit intoopencv:4.xfrom Apr 17, 2024
Merged
Conversation
asmorkalov
approved these changes
Apr 17, 2024
asmorkalov
pushed a commit
to opencv/opencv
that referenced
this pull request
Apr 17, 2024
features2d: reduce accuracy test avg memory consumption #25424 **Merge with contrib**: opencv/opencv_contrib#3722 I've observed high memory consumption in the `opencv_test_features2d` (x86_64, Ubuntu 22.04, Debug):  It's always more than 180 MiB with peak at 535 MiB This was caused by pointers to the algorithm object instances stored in the tests parameters. I've replaced them with factory functions/lambdas with the following result:  Now peak is at 355 MiB and permanent consumption level is ~ 1-2 MiB **Note:** current peak is caused by KAZE features allocating 8x image size utility buffers. Not sure if we can or should do anything about it: https://github.com/opencv/opencv/blob/66fb5021e9253e3decab376d00322eaf2b279c89/modules/features2d/src/kaze/KAZEFeatures.cpp#L61-L68
Merged
klatism
pushed a commit
to klatism/opencv
that referenced
this pull request
May 17, 2024
features2d: reduce accuracy test avg memory consumption opencv#25424 **Merge with contrib**: opencv/opencv_contrib#3722 I've observed high memory consumption in the `opencv_test_features2d` (x86_64, Ubuntu 22.04, Debug):  It's always more than 180 MiB with peak at 535 MiB This was caused by pointers to the algorithm object instances stored in the tests parameters. I've replaced them with factory functions/lambdas with the following result:  Now peak is at 355 MiB and permanent consumption level is ~ 1-2 MiB **Note:** current peak is caused by KAZE features allocating 8x image size utility buffers. Not sure if we can or should do anything about it: https://github.com/opencv/opencv/blob/66fb5021e9253e3decab376d00322eaf2b279c89/modules/features2d/src/kaze/KAZEFeatures.cpp#L61-L68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge together with opencv/opencv#25424