phlex icon indicating copy to clipboard operation
phlex copied to clipboard

Optimize nested tokens

Open joeldrapper opened this issue 1 year ago • 1 comments

After reading through #746 I had an idea about how to further optimise nested tokens (Arrays and Sets).

  1. .compact.join was doing two iterations over the array: one to remove nils and one to build a string.
  2. .gsub was creating a new string unnecessarily.

joeldrapper avatar Aug 12 '24 11:08 joeldrapper