delta icon indicating copy to clipboard operation
delta copied to clipboard

refactor: avoid strange round-trip of draw_fn arguments

Open Integral-Tech opened this issue 10 months ago • 3 comments

  • There is a strange round-trip of draw_fn arguments:
let (draw_fn, pad, style) = draw::get_draw_function();
draw_fn(pad, style, ...);

Refactor code to avoid the unnecessary round-trip.

  • Although format! macro is very powerful, it introduces overhead of memory allocation on the heap compared to &str. Therefore, when format! macro is unnecessary, we should avoid using it.

Integral-Tech avatar Dec 08 '24 05:12 Integral-Tech