Repository navigation
OnlyWorlds Unity SDK 0.52.0
A stored calendar no longer sets what one date label costs: in 0.51.0 a calendar with long runs of spaces in its
labels, or a very long month, could take seconds to minutes for one label (measured on Mono, outside Unity), and now
takes under a millisecond, with every answer as before. Beside it, the most linked elements of each type, from a
reader's graph. A minor release because it adds public API (below).
Added
OWMostLinked.Of(graph, options): the most linked elements of each type. From the graphOWGraph.Read
answers for a reader, so only what that reader is served is counted (map space, hidden, proposed and room elements
stay out unless the graph brought them in). For each type, at mostPerType(default 3) of its elements by the
landing profile's degree (OWGraph.DegreeOf), highest first, ties by id in code point order; a node of degree 0
and a known-of node are never picked, and a type with nothing to pick is left out. The answer, anOWMostLinked,
holdsPerType,Types(in code point order) andByType, each entry anOWLinked(Id,Nameas the graph
holds it or null,Degree);ToJson()writes{per_type, by_type}. A few of every type, never one ranking: it is
"the most linked", not "where to start", since in a world with a secret the secret is often the hub. Options come
typed (OWMostLinkedOptions) or as JSON (OWMostLinkedOptions.FromJson, the keyper_type); an unknown key, or a
per_typethat is not a whole number from 1 to 2^53 - 1, is refused by name (OWLandingRefusedException). A draft
reading of the packages, held to their own fixture until the landing profile takes it:most-linked.fixture.json
(18 cases) is vendored byte for byte, its sha256 held, and every case compared byte for byte. Parity with the
TypeScript SDK 4.203.0.
Fixed
- A stored calendar no longer sets what one date label costs.
FormatStepcollapsed the separators around an
empty token and trimmed a label's edges with regular expressions whose time grew with the cube or the square of a
long run of white space or marks: measured on Mono outside Unity, a month name with 3,000 spaces took 215 seconds
for one label, a template with 4,000 spaces 527 seconds, 20,000 commas at a label's edge about 10 seconds. A year
was a list of every day, built on each call, so a month of 5,000,000 days cost 0.6 to 1.3 seconds a label in
FormatStep,WeekdayForStep,BreakdownStepandParseDate. Both are one pass now, and a year is its runs of
days, each answer arithmetic. The package's own JavaScript trim, whichFormatDurationreads a step word through,
had the same fault (20,000 spaces inside a step word: 7 seconds) and is one pass too. Every answer is the same as
before: 4,000 made templates against the old regular expressions and every step of six made calendars against the
old list of days (weekdays, parts of a date, labels read back), and the calendar's other tests unchanged. Parity
with the TypeScript SDK 4.201.2, its cost cases replayed:calendar-cost.cases.json(8 cases, the same bytes as
the Python package's) is vendored byte for byte with its sha256 held, and each case answers its words inside the
TypeScript SDK's 50 ms.