enso/lib/rust/ensogl/component/text/Cargo.toml
Kaz Wesley b58470145c
Widgets: improve scalability in some cases (#3920)
Fix issues noted here: https://github.com/enso-org/enso/pull/3678#issuecomment-1273623924
- Time complexity of an operation during line-redrawing scaled quadratically with number of lines in a change; now linear.
- Time complexity of adding `n` selections to a group was `O(n^2)`. Now it is `O(n log n)`, even if the selections are added one by one.

Also fix a subtle bug I found in `Group::newest_mut`: It returned a mutable reference that allowed breaking the *sorted* invariant of the selection group. The new implementation moves the element to invalidated space before returning a reference (internally to `LazyInvariantVec`), so that if it is mutated it will be moved to its correct location.

### Important Notes

New APIs:
- `NonEmptyVec::extend_at` supports inserting a sequence of elements at a location, with asymptotically-better performance than a series of `insert`s. (This is a subset of the functionality of `Vec::splice`, a function which we can't safely offer for `NonEmptyVec`).
- `LazyInvariantVec` supports lazily-restoring an invariant on a vector. For an invariant such as *sorted* (or in this case, *sorted and merged*), this allows asymptotically-better performance than maintaining the invariant with each mutation.
2022-11-30 13:36:28 +01:00

32 lines
905 B
TOML

[package]
name = "ensogl-text"
version = "0.1.0"
authors = ["Enso Team <contact@enso.org>"]
edition = "2021"
[lib]
crate-type = ["rlib", "cdylib"]
[dependencies]
enso-frp = { path = "../../../frp" }
enso-prelude = { path = "../../../prelude" }
enso-shapely = { path = "../../../shapely" }
enso-text = { path = "../../../text" }
enso-types = { path = "../../../types" }
ensogl-core = { path = "../../core" }
ensogl-text-embedded-fonts = { path = "src/font/embedded" }
ensogl-text-msdf = { path = "src/font/msdf" }
const_format = "0.2.22"
xi-rope = { version = "0.3.0" }
owned_ttf_parser = "0.15.1"
bincode = "2.0.0-rc.1"
serde = { version = "1", features = ["rc"] }
ordered-float = "3.0.0"
ensogl-text-font-family = { path = "src/font/family" }
rustybuzz = "0.5.1"
[dev-dependencies]
rand = { version = "0.8.5", default-features = false }
rand_chacha = "0.3.1"
wasm-bindgen-test = { version = "0.3.8" }