Blog
Blog copied to clipboard
Star 就是最大的鼓励👏👏👏
Bumps [json5](https://github.com/json5/json5) from 0.5.1 to 1.0.2. Release notes Sourced from json5's releases. v1.0.2 Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a...
Bumps [express](https://github.com/expressjs/express) from 4.16.3 to 4.18.2. Release notes Sourced from express's releases. 4.18.2 Fix regression routing a large stack in a single route deps: [email protected] deps: [email protected] perf: remove unnecessary...
Bumps [qs](https://github.com/ljharb/qs) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together. Updates `qs` from 6.5.1 to 6.11.0 Changelog Sourced from qs's changelog. 6.11.0 [New] [Fix] stringify: revert 0e903c0; add commaRoundTrip...
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. Release notes Sourced from decode-uri-component's releases. v0.2.2 Prevent overwriting previously decoded tokens 980e0bf https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2 v0.2.1 Switch to GitHub workflows 76abc93 Fix issue where decode...
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. Release notes Sourced from decode-uri-component's releases. v0.2.2 Prevent overwriting previously decoded tokens 980e0bf https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2 v0.2.1 Switch to GitHub workflows 76abc93 Fix issue where decode...
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.1.0 to 1.4.2. Release notes Sourced from loader-utils's releases. v1.4.2 1.4.2 (2022-11-11) Bug Fixes ReDoS problem (#226) (17cbf8f) v1.4.1 1.4.1 (2022-11-07) Bug Fixes security problem (#220) (4504e34)...
对于在线文档的难点,大部分同学的第一反应都是协同编辑,如何解决多人协作的冲突的问题。 关于ot协作的介绍,这篇文章已经有了一定的初步介绍,本文在[这篇文章](http://www.alloyteam.com/2019/07/13659/)之上,精读一下[ot.js](https://github.com/Operational-Transformation/ot.js)这个库,一起来学习下如何实现一个ot.js。 ot.js中核心的文件是text-operation.js文件,本文精读也将围绕它展开。 对于协同编辑场景,都要解决哪些问题呢? 1. 支持将多次操作合并成一次 2. 对不同用户的多次操作进行合并,并返回相对应的opts,使不同用户的界面展示保持一致。 3. 对于用户的操作支持回退 要实现上面这3个需求,我们先来看看如何设计ot算法中的数据结构。 ```javascript function TextOperation () { if (!this || this.constructor !== TextOperation) { // => function was called without 'new'...
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.5 to 4.17.21. Commits f299b52 Bump to v4.17.21 c4847eb Improve performance of toNumber, trim and trimEnd on large input strings 3469357 Prevent command injection through _.template's variable...
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.17 to 0.7.28. Commits 1d3c98a Revert breaking fix #279 and release as 0.7.28 535f11b Delete redundant code 642c039 Fix #492 LG TV WebOS detection 3edacdd Merge branch...
> 在工作中很少能够碰到内存泄漏的问题,但是一旦遇到了,就是一个比较难解的问题, > 本文旨在记录这次在问题排查的过程中,一些思路和排查方向 收到告警后,笔者先登录到告警机器中, `top`命令查看此时此刻的各个应用程序占用的内存大小, 这里其实有两个指标可以查看, - vitr - res > virt是虚拟内存,而 res是进程实际分配的物理内存。一般通过res查看应用内存的物理占用量, 但是你会发现,如果把每个应用程序的res加一起很有可能超过机器总内存,这是因为不同应用程序有可能引用同一个库,此时这个库被缓存,那么这两个应用程序都会将这个库所占用的内存算进去。 这时候发现,我们的node服务占用的内存是在正常范围中。 于是我们又`free -g`看了下,发现used占用的内存并不多,但是buffer/cached占用的内存,超过了80%。 buffer/cached 是机器帮我们缓存的文件内容,当内存不足时,有一部分缓存是会被机器给释放掉的,也就是说,机器真正的可用内存应该是 `aviliable = free + buffers + cached - 不可清空的缓存` 所以不会影响业务,笔者也就长舒了一口气,可以喝杯茶再解决这个问题了。...