-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[nav2_costmap_2s]: free correctly the memory in the InflationLayer #4424
[nav2_costmap_2s]: free correctly the memory in the InflationLayer #4424
Conversation
Signed-off-by: Davide Faconti <davide.faconti@gmail.com>
44a48a9
to
ee5349f
Compare
Note: performance was measured and this is slightly faster, even if we need to recompute the index. Probably a benefit at the level of the CPU cache Signed-off-by: Davide Faconti <davide.faconti@gmail.com>
Signed-off-by: Davide Faconti <davide.faconti@gmail.com>
d7b9dd3
to
c0c2939
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested at Dexory, great memory gains proportional to the number of inflated cells. In other words bigger gains with big maps and small resolution.
Will wait to see if @SteveMacenski has a say and then we can merge.
@BriceRenaudeau fyi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat, no objections here!
…os-navigation#4424) * [nav2_costmap_2s]: free correctly the memory in the InflationLayer Signed-off-by: Davide Faconti <davide.faconti@gmail.com> * Remove 4 redundant bytes from CellData in Inflationlayer Note: performance was measured and this is slightly faster, even if we need to recompute the index. Probably a benefit at the level of the CPU cache Signed-off-by: Davide Faconti <davide.faconti@gmail.com> * formatting Signed-off-by: Davide Faconti <davide.faconti@gmail.com> --------- Signed-off-by: Davide Faconti <davide.faconti@gmail.com>
…os-navigation#4424) * [nav2_costmap_2s]: free correctly the memory in the InflationLayer Signed-off-by: Davide Faconti <davide.faconti@gmail.com> * Remove 4 redundant bytes from CellData in Inflationlayer Note: performance was measured and this is slightly faster, even if we need to recompute the index. Probably a benefit at the level of the CPU cache Signed-off-by: Davide Faconti <davide.faconti@gmail.com> * formatting Signed-off-by: Davide Faconti <davide.faconti@gmail.com> --------- Signed-off-by: Davide Faconti <davide.faconti@gmail.com>
…os-navigation#4424) * [nav2_costmap_2s]: free correctly the memory in the InflationLayer Signed-off-by: Davide Faconti <davide.faconti@gmail.com> * Remove 4 redundant bytes from CellData in Inflationlayer Note: performance was measured and this is slightly faster, even if we need to recompute the index. Probably a benefit at the level of the CPU cache Signed-off-by: Davide Faconti <davide.faconti@gmail.com> * formatting Signed-off-by: Davide Faconti <davide.faconti@gmail.com> --------- Signed-off-by: Davide Faconti <davide.faconti@gmail.com>
Basic Info
Description of contribution in a few bullet points
When using very large maps ( we are talking about maps in the order of 200 Mb), we noticed that the
InflationLayer
would consume a VERY large amount of memory.After investigation, we realized that:
See the difference before and after:
Before
After
The impact in terms of performance (CPU usage) should be negligible
Description of documentation updates required from your changes
None
Future work that may be required in bullet points
None
For Maintainers: