Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(performance): do not hang when resizing large line wraps #814

Merged
merged 3 commits into from
Oct 29, 2021
Merged

Conversation

imsnif
Copy link
Member

@imsnif imsnif commented Oct 29, 2021

Before this fix, Zellij would sometimes hang when resizing or scrolling through extremely large line wraps (eg. large one-line css files). This fixes the issue by (among other things) using a VecDeque instead of a Vec to keep track of the columns in a row. That way when we remove/add a character from their beginning (which we do often in this scenario) the complexity is O(1) instead of O(n).

@imsnif imsnif merged commit 42b6664 into main Oct 29, 2021
imsnif added a commit that referenced this pull request Nov 8, 2021
* Half-page scroll actions #794

* fix(performance): do not hang when resizing large line wraps (#814)

* fix(performance): do not hang when resizing large line wraps

* style(fmt): make rustfmt happy

* style(clippy): make clippy happy

* docs(changelog): scroll fix

* fix(compatibility): home and end key fix (#815)

* fix(compatibility): handle home/end keys properly from terminfo

* style(fmt): make rustfmt happy

* style(fmt): remove unused import

* docs(changelog): home end key fix

* docs(changelog): fix link

* fix(typo): Correct typo from `occured` to `occurred` (#821)

* docs(changelog): fix a typo

* fix(docs): fix wrong arguments for `cargo make run` given in CONTRIBUTING.md (#819)

* docs(changelog): update `cargo-make` for `v0.35.3`

* fix(warning): Fix an unused import warning of std::fs on macos (#820)

* docs(changelog): fix unused import on darwin

* add: `WriteChars` action (#825)

* Behaves like the `Write` action, but one can specify
  strings themselves instead of their bytecodes.

  Usage:

  WriteChars: "cargo make test",

* docs(changelog): Add `WriteChars` action

* fix(docs): Fix a typo and some grammatical errors in bug_report.md (#826)

* docs(changelog): fix typo bug_report template

* add: `rust-version` (msrv) field to `Cargo.toml` (#828)

* specifies the minimum version the package can be compiled with,
  may be ignored with `--ignore-rust-version` option

  ref: https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field

* docs(changelog): add `rust-version` to `Cargo.toml`

* fix(unix): forkpty => openpty (#830)

* fix(unix): forkpty => openpty

* style(fmt): make rustfmt happy

* docs(changelog): forkpty => openpty

* Fix: move `colors_transform` to `colorsys` (#832)

* `colors_transform` is deprecated and superceded by `colorsys`

  ref: https://crates.io/crates/colors-transform

* docs(changelog): `colors_transform` to `colorsys`

* feat(ui): add right-click support to plugins

* chore(docs): update changelog

* chore(warnings): remove unused imports (#833)

* rename var sroll_rows and review snapshots

* style(fmt): make rustfmt happy

Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: Ken Matsui <26405363+ken-matsui@users.noreply.github.com>
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
Co-authored-by: Tw <tw19881113@gmail.com>
Co-authored-by: Brooks Rady <b.j.rady@gmail.com>
@har7an har7an deleted the line-wrap branch October 23, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant