fsprojects / Avalonia.FuncUI

Develop cross-plattform GUI Applications using F# and Avalonia!
https://funcui.avaloniaui.net/
MIT License
955 stars 74 forks source link

Replace a use of Seq.iteri over a list with List.iteri #374

Closed Numpsy closed 10 months ago

Numpsy commented 10 months ago

I've been having a go with with the F# analyzers tools, and got this suggestion that using List.iteri rather than Seq.iteri when the collection is known to be a list should be more efficient

Avalonia.FuncUI\VirtualDom\VirtualDom.Patcher.fs(92,25): Warning GRA-VIRTUALCALL-001 - Consider replacing the call of Seq.iteri with a function from the List module to avoid the costs of virtual calls.
JaggerJo commented 10 months ago

LGTM