mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-08-16 22:50:22 +03:00
A Community-led Hyper-Hackable Text Editor
…but only while we can afford to spend time on re-parsing. Synchronous indentation hinting is clearly the best choice, but it can theoretically be very costly. So we'll set a time budget per transaction — currently 10ms, but could be adjusted up or down. We'll start out doing synchronous indentation, but flip to async indentation if we run out of time in a given transaction. At the end of a transaction, the time budget resets. This allows us to balance indentation accuracy with editor responsiveness, and would even allow us to expose this tradeoff as a setting in the future. The current threshold, 10ms, would probably result in one dropped frame if exceeded, but not two. Right now, any one parse can exceed the budget — because we don't set a timeout on the parse the way we do with an async parse. But this could be changed in the future. The main goal here is to prevent a catastrophic scenario where a complex transaction locks up the editor. |
||
---|---|---|
.github | ||
docs | ||
dot-atom | ||
exports | ||
hooks | ||
integration | ||
keymaps | ||
menus | ||
packages | ||
ppm@241d794f32 | ||
resources | ||
script | ||
spec | ||
src | ||
static | ||
vendor | ||
.cirrus.yml | ||
.codacy.yaml | ||
.eslintignore | ||
.eslintrc.js | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.nvmrc | ||
.yarnrc | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
Dockerfile | ||
LICENSE.md | ||
package.json | ||
playwright.config.ts | ||
pnpm-workspace.yaml | ||
PULL_REQUEST_TEMPLATE.md | ||
pulsar.sh | ||
README.md | ||
SUPPORT.md | ||
yarn.lock |