delta-client icon indicating copy to clipboard operation
delta-client copied to clipboard

Optimise `Profiler`

Open stackotter opened this issue 3 years ago • 5 comments

Fixing this issue will give you an introduction to optimising Swift code. If you have no idea where to start, ask on the Discord server and I'll give you some tips and tricks.

Given that the Profiler is used mostly in performance critical places, it would be useful to make it as optimised as possible so that readings are as accurate as possible (if it's too slow it starts noticeably affecting its own readings when nesting).

stackotter avatar Sep 10 '22 04:09 stackotter

Some initial tips to get you started:

  • Reserve capacity for a collection if you have an approximate idea of how many elements it will have
  • Move repeated calculations out of loops
  • Cache results if it makes sense
  • See OptimizationTips in the official Swift repo for further tips

stackotter avatar Oct 10 '22 00:10 stackotter

@stackotter Hey, can you assign me on this one?

japanese-goblinn avatar Oct 15 '22 11:10 japanese-goblinn

Hi, sorry, have no time recently to work on this. Now when i've been laid off from my current job I've more free time 🤡

japanese-goblinn avatar Nov 15 '22 16:11 japanese-goblinn

Hi, sorry, have no time recently to work on this. Now when i've been laid off from my current job I've more free time 🤡

I'm sorry to hear that man :( I wish you the best in finding a new job! Delta Client is of course second priority to anything else that comes up in your life, so no pressure to complete this task anytime soon

I'm excited for you to contribute again, your first contribution was super useful! Let me know if I can help out with anything

stackotter avatar Nov 16 '22 05:11 stackotter

@japanese-goblinn let me know if you want me to assign you again, I'm just going through and unassigning issues that haven't been touched in a while

stackotter avatar Jan 04 '23 08:01 stackotter