UnigramDev/Unigram/develop • 6948fd1 • 1 files, +10/-3
Fetch actual premium limit for folders count
UnigramDev/Unigram/develop • ab9ded8 • 4 files, +0/-0
Synchronize tlottie
UnigramDev/Unigram/develop • a612ce5 • 1 files, +29/-0
Update triage skill
UnigramDev/Unigram/develop • c788ba8 • 10 files, +749/-41
Generate a second set of parsers that read through TdJsonReader
SchemaGenerator now emits FromPtr_* alongside FromJson_*, from the same schema so
the two cannot drift. Opt-in via <TdPointerParser>true</TdPointerParser> and a
matching CompilerVisibleProperty; with it off the generated file is byte for byte
what it was, which is what makes changing the generator safe when the app itself
cannot be built here.
Fields dispatch on name length then an exact compare rather than CRC32 - few
enough per class for that to be cheap, and an unknown field cannot collide with a
known one. @type keeps the hash, because eighty constructors is the wrong shape
for a compare chain; TdJsonReader.ValueCrc32 walks raw memory and has to agree
with the values the generator bakes in.
Full parse on .NET Native, same payloads and the same objects out:
updateUserStatus 682.2 ns -> 335.6 ns 2.0x
updateFile 2.78 us -> 1.12 us 2.5x
updateNewMessage 8.15 us -> 3.76 us 2.2x
messages x50 436.3 us -> 181.7 us 2.4x
updateOption 1.41 us -> 493.2 ns 2.9x
Allocation is identical to the byte, so the parser stays copy- and
allocation-free. On the desktop JIT the two are at parity.
Validation runs the same assertions over both readers on every host and reports
ok including on .NET Native, so the pointer parsers agree with the netstandard2.0
System.Text.Json ones across nested objects, vectors, abstract dispatch, escapes
and unknown fields. The deep field-by-field comparison needs reflection and stays
on the desktop.
Two harness bugs fixed on the way: the shared validation had grown a reflective
comparison that .NET Native has no metadata for, and UwpHost called it outside its
try block - so it threw and the app sat on "running..." with no report and no
clue why.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
#unigram
Post #20690
27