Frontend
3 posts with this tag

前端效能優化(2) - Throttle
Throttle 也是一種常見的效能優化方式,與 Debounce 類似,但不同的地方在 Throttle 能確保一個函式在一段時間內只會觸發一次,無論該函式被呼叫幾次。
3 mins read
|
503 words

前端效能優化(1) - Debounce
Debounce 是一種常見的效能優化方式,主要用於限制高頻事件的觸發次數,例如:當你使用 Google 搜尋某個關鍵字,它並不會在你輸入過程不斷搜尋,而是當你停下輸入後才去做搜尋的動作。
3 mins read
|
561 words