debounce-vs-throttle

https://redd.one/blog/debounce-vs-throttle

用动画的形式给出了差别的描述。

文字上来说, debounce 

Discard emitted values that take less than the specified time, based on selector function, between output.

而  throttle

Emit value on the leading edge of an interval, but suppress new values until durationSelector has completed.

所以对某个时间段参数, 用throttle会保证一次发生(不会多), 而debounce不能保证发生。

 

 

OpenXml SDK操作excel文件的性能和内存

How to properly use OpenXmlWriter to write large Excel files

可以通过使用OpenXmlWriter来解决。其实主要是sheetData部分需要用xmlWriter.在block对象SheetPart的创建部分还是可以继续用DOM.