cms::with_active put its settings in place of the active settings on
its thread, but cms::working() still read the process-wide working
settings. Code inside with_active could therefore read active settings
from one context and working settings from another, and a set_active
on another thread changed the working half while the scope ran.
Inside with_active, working() now gives the working settings of the
context it was given: the ones for_document put a document's profiles
in place of, else that context itself. use_document_profiles and
for_document still read the process working settings, because they
install or keep process-wide contexts. Outside with_active nothing
changes. The app calls with_active only with for_document contexts
(canvas panes and the color mode change on open), whose working
settings are the process ones, so the app reads the same working
settings as before.
scripts/ci-clear-rolling-cache.py:
- The 160-minute wait is timed from the cache warm leg's start, not from
the script's start. The clear job starts with the run, and the leg
starts after gate / select legs and a free runner. The job's timeout
goes from 170 to 200 minutes to leave room for that delay.
- The leg counts as saving when its Post Setup step (the gate-setup
action's cache save) starts, not when any Post step starts. A leg that
ends canceled or failed before that step succeeds deletes nothing and
exits 1, as a leg that failed before its save already did.
- actions/caches is read one page at a time, sorted by creation, until a
page holds fewer than 100 entries.
scripts/ci-clear-rolling-cache-tests.py checks the script with recorded
API answers, and Nightly check runs it when either file changes.
many_by_block_looks_import_in_linear_time and
many_paper_layouts_are_read_in_linear_time checked for quadratic work by
timing the import (under 4 and 5 seconds), so a slow machine could fail
them and a regression that stayed under the bound passed. They now count
the work in test builds:
- the names `unique` tries for a new symbol: 4,000 symbols named by one
block try fewer than 8,000 names (8,002,000 without the per-label
suffix memo);
- the layout names the paper-layout de-duplication compares: 10,000
layouts compare at most 10,000 (49,995,000 with a list in place of the
set).
The counters are thread-local cells under cfg(test); release builds do
not count.
The plug-in store turn, the Data Recovery area hold, the script grants
lock and the hang report file each released their file lock only by
closing the file. The lock stays held while any copy of the handle is
open, and a child process that any thread starts holds a copy until it
runs its program. While one was starting, the next turn on the plug-in
store waited, an app found its own recovery area busy, a grants change
timed out, and the next launch left a hang report alone.
Each holder now unlocks the file when it is dropped, as #9837 does for
the nightly session and the GPU start file. The engine's three locks
share one type, `store::LockedFile`. A left hang report that a launch
locks to read is held the same way.
Each new test keeps a copy of the handle open, drops the holder and
takes the lock again.
With Use Preview Bounds on, a Linear point landed only on the four corners
of the preview bounds of a path or compound path. A group's own stroke or
effects and stroked type widen the bounds that W and H show, but gave no
corner to pick, and a click beside a stroked edge snapped to the stroke's
centerline.
- Stroked type, and a group or layer with fills, strokes or effects of
its own, now give the corners of their preview bounds. A group's corner
is held against the member path whose own box reaches nearest to it. A
point on type has no link and stays where it was picked. A group or
layer holding dimension artwork gives no corner, since its bounds take
in the dimensions.
- A click that no anchor, corner, line end, guide, grid or pixel snapping
places lands on the nearest point of an edge of the preview bounds
within 8 pixels when no segment or dimension line is nearer. The point
is held against the path holding the edge's nearer corner.
- Group members count against the same per-move member work as compound
paths; a group holding more than one move may read is not read again
for that revision.
Docs: docs/dimensions.md, docs/target-app-parity.md.
The four tests of the pre-open stream scan and the page hash test
asserted elapsed time (5 s and 60 s), so a loaded machine could fail
them and a slower but still bounded scan could pass them.
- streams.rs: a test-only counter adds up the bytes the scan looks at:
in each helper that walks the file, in each charge to the scan's
budget, and once for each step of the main reading. The tests assert
at most 32 bytes looked at for each byte of the file. The largest
case today looks at 21.
- editing.rs: a test-only counter adds up the page content the hash
decodes. The test asserts no more than the hash limit plus the one
stream that goes past it.
Each counter assertion fails on a broken version: strings read to the
end of the file instead of 64 bytes (131,076 bytes a byte), each
stream keyword reading back 64 KiB (7,937 bytes a byte), and every
page decoding the shared stream again (300 MiB decoded).
a_read_stops_at_its_limit and a_copys_data_is_sent_through_the_pipe_and_closed
send more than a pipe holds through a default `Sends`, whose idle limit is
the app's 2 s `IDLE_WAIT`. When the test thread took more than 2 s between
reads, the send gave up: the first test then got the bytes sent so far
instead of the "larger than 2 MiB" error, and the second got only part of
the data.
Both tests now send through `Sends { idle: LONG, .. }`, as
pastes_that_read_nothing_hold_a_few_sends_at_most does, so each send ends
when the reader takes the data or closes the pipe. The second test still
checks that a default `Sends` uses `IDLE_WAIT`. Every assertion is kept.