enso/lib/rust
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
..
automata Build script merge (#3743) 2022-10-10 23:38:48 +02:00
callback Bump rustc nightly-2022-11-22 (#3911) 2022-11-30 03:16:25 +01:00
code-builder Build script merge (#3743) 2022-10-10 23:38:48 +02:00
config-reader Fox warnings about colliding filenames. (#3908) 2022-11-24 18:54:45 +01:00
data-structures Wip/wdanilo/text shape system single scene 183406745 (#3776) 2022-11-03 08:35:06 +01:00
debug-api Build script merge (#3743) 2022-10-10 23:38:48 +02:00
ensogl Widgets: improve scalability in some cases (#3920) 2022-11-30 13:36:28 +01:00
frp Rust compile time optimizations (#3873) 2022-11-15 14:09:39 +01:00
fuzzly Build script merge (#3743) 2022-10-10 23:38:48 +02:00
generics Rust compile time optimizations (#3873) 2022-11-15 14:09:39 +01:00
json-rpc removing optional dependencies from prelude (#3922) 2022-11-28 12:42:31 +01:00
launcher-shims Add docs explaining the purpose and mechanisms of launcher-shims project (#3834) 2022-11-04 07:04:57 +00:00
logger Wip/wdanilo/text shape system single scene 183406745 (#3776) 2022-11-03 08:35:06 +01:00
macro-utils Fox warnings about colliding filenames. (#3908) 2022-11-24 18:54:45 +01:00
metamodel Bump rustc nightly-2022-11-22 (#3911) 2022-11-30 03:16:25 +01:00
parser Bump rustc nightly-2022-11-22 (#3911) 2022-11-30 03:16:25 +01:00
prelude Widgets: improve scalability in some cases (#3920) 2022-11-30 13:36:28 +01:00
profiler Wip/wdanilo/text shape system single scene 183406745 (#3776) 2022-11-03 08:35:06 +01:00
reflect Bump rustc nightly-2022-11-22 (#3911) 2022-11-30 03:16:25 +01:00
shapely Build hotfix (#3916) 2022-11-25 14:05:57 +01:00
shortcuts Build script merge (#3743) 2022-10-10 23:38:48 +02:00
text Editing via esc does not correctly update node view (#3799) 2022-10-25 15:37:49 +00:00
types Bump rustc nightly-2022-11-22 (#3911) 2022-11-30 03:16:25 +01:00
web Implement TextGridView (#3819) 2022-11-18 18:52:28 +00:00