mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 03:51:43 +03:00
b58470145c
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. |
||
---|---|---|
.. | ||
automata | ||
callback | ||
code-builder | ||
config-reader | ||
data-structures | ||
debug-api | ||
ensogl | ||
frp | ||
fuzzly | ||
generics | ||
json-rpc | ||
launcher-shims | ||
logger | ||
macro-utils | ||
metamodel | ||
parser | ||
prelude | ||
profiler | ||
reflect | ||
shapely | ||
shortcuts | ||
text | ||
types | ||
web |