Skip to content

Conversation

adamhathcock
Copy link
Member

@adamhathcock adamhathcock commented Feb 14, 2025

Part of https://linear.app/speckle/issue/CNX-1324/improving-send-and-receive-perf

Tasked to do some profiling.

First change is to a converter hotspot that seems to speed up by doing some work on the stack then allocating for arrays instead of doing it upfront:

before:
Screenshot 2025-02-14 155343

after:
image

I didn't see a real difference in allocates but probably saves some capacity setting. It wouldn't expect a big difference because it is ultimately allocating for these values.

BrepEncoding is a big allocator:

before:
image

after:
Screenshot 2025-02-14 155954

It can probably be reduced by only doing the byte array then the serializer knows what to do with it (base64 later) to reduce memory usage

More to come...

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 8.71%. Comparing base (fe5b77e) to head (094ecc3).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...hinoShared/ToSpeckle/Raw/MeshToSpeckleConverter.cs 0.00% 25 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             dev    #590      +/-   ##
========================================
- Coverage   8.71%   8.71%   -0.01%     
========================================
  Files        227     227              
  Lines       4370    4374       +4     
  Branches     545     546       +1     
========================================
  Hits         381     381              
- Misses      3974    3978       +4     
  Partials      15      15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

linear bot commented Feb 26, 2025

@adamhathcock adamhathcock merged commit e6d9833 into dev Mar 5, 2025
5 checks passed
@adamhathcock adamhathcock deleted the adam/rhino-speed branch March 5, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants