mirror of
https://github.com/Eugeny/tabby.git
synced 2025-08-11 03:41:55 +00:00
.github
.vscode
app
assets
lib
app.ts
cli.ts
config.ts
index.ts
lru.ts
pluginManager.ts
portable.ts
pty.ts
sentry.ts
stringDecoder.ts
utfSplitter.ts
window.ts
patches
src
dev-app-update.yml
index.pug
package.json
tsconfig.json
tsconfig.main.json
webpack.config.js
webpack.main.config.js
yarn.lock
build
docs
extras
locale
patches
scripts
snap
tabby-community-color-schemes
tabby-core
tabby-electron
tabby-linkifier
tabby-local
tabby-plugin-manager
tabby-serial
tabby-settings
tabby-ssh
tabby-telnet
tabby-terminal
tabby-uac
tabby-web
tabby-web-demo
web
.all-contributorsrc
.editorconfig
.eslintrc.yml
.gitignore
.mergify.yml
.pug-lintrc.js
CODE_OF_CONDUCT.md
HACKING.md
LICENSE
README.de-DE.md
README.es-ES.md
README.id-ID.md
README.it-IT.md
README.ja-JP.md
README.ko-KR.md
README.md
README.ru-RU.md
README.zh-CN.md
electron-builder.yml
firebase.json
package.json
tsconfig.json
typedoc.js
webpack.config.js
webpack.plugin.config.js
yarn.lock
18 lines
437 B
TypeScript
18 lines
437 B
TypeScript
import LRU from 'lru-cache'
|
|
import * as fs from 'fs'
|
|
const lru = new LRU({ max: 256, maxAge: 250 })
|
|
const origLstat = fs.realpathSync.bind(fs)
|
|
|
|
// NB: The biggest offender of thrashing realpathSync is the node module system
|
|
// itself, which we can't get into via any sane means.
|
|
require('fs').realpathSync = function (p) {
|
|
let r = lru.get(p)
|
|
if (r) {
|
|
return r
|
|
}
|
|
|
|
r = origLstat(p)
|
|
lru.set(p, r)
|
|
return r
|
|
}
|