pointfreeco / swift-perception

Observable tools, backported.
MIT License
575 stars 44 forks source link

Improve perception performance #24

Closed mbrandonw closed 10 months ago

mbrandonw commented 10 months ago

We now cache the result of perception checking by the file/line where the registrar's access is called, but we only cache if it's true so that we do not need to check again if a warning has already been displayed. We do not cache if it's false so that we can check again next time, just in case the access is happening from a different view.

SongJiyeon commented 9 months ago

@mbrandonw Can you tell me how to use that warning message to debug my perception? I just print the file and line with the warning message and it gave me "PerceptionRegister.swift", 124 to me where your method is in.

mbrandonw commented 9 months ago

Hi @SongJiyeon, I'm not sure I understand the question. Can you start a discussion and provide more details?