Skip to content

v0.29.0-alpha — Faster Arrival in a Region: Textures Stream, Avatars Show Their Skin Sooner

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 03 Nov 09:26
· 23 commits to main since this release
16324dd

Since v0.28.69-alpha this release is about one thing: how fast a region looks right after you arrive in it, especially a crowded one. Four changes carry the measured gain. Textures now stream (a coarse picture first, then only the bytes the screen needs) and this is on by default. Other people's skin and clothes are ranked for download like scenery instead of waiting behind it. Avatars over the "Max fully rendered avatars" limit now show their bakes instead of one flat colour. And a texture that has arrived is bound at once, instead of waiting behind unrelated work. The arrival was measured run by run, and the numbers below come from those runs.

Arriving in a region

All figures were measured in one test region on one machine, as medians of three cold and three warm arrivals. "Cold" means the region and its textures are not in the disk cache yet; "warm" means they are. "Settled" means nothing is still waiting for a texture, apart from a tail of at most 50 faces.

Baseline (v0.28.78) v0.29.0
Cold arrival settles after 134 s 60 s
Warm arrival settles after 72 s about 12 s
Texture data downloaded on a cold arrival about 1.7 GB about 0.8 GB

Read these with three caveats:

  • The cold figure is from one calm morning. A busier network, another region or another machine will give other numbers.
  • The 134 s baseline, and the 106 s that streaming reached, were measured with a diagnostic probe that only runs under --diag and costs main-thread time. A normal session never runs it, and the 60 s was measured without it. Counted with the probe in both, cold went from 134 s to 106 s.
  • The warm figure and the download size do not depend on the probe: warm went from 72 s to 11 s with the probe in both, and 11.5 s without it.

What changed:

  • Textures stream, on by default (FEAT-PERF-29). The first request for a texture asks only for its first 18,840 bytes (an HTTP Range request) and shows that coarse picture. The viewer then fetches exactly as far as the pixel area on screen needs, as the reference viewer does. Partial downloads are kept in the disk cache and completed later. Bakes, sculpt maps and your own avatar's textures are still fetched whole. Streaming cut the cold download by about 58 % in our A/B test. --no-tex-stream turns it off for one start (every texture is fetched whole again); --tex-stream is still accepted and does nothing.
  • Other avatars' textures rank by size like scenery (BUG-PERF-24). They used to ask with priority 0 and got a download slot only when no scenery texture was waiting, which on a crowded arrival meant the end of the backlog. They now ask by apparent size (radius over distance), with the same function as scenery. The avatar under your camera and your own avatar keep their boosts.
  • Texture binds have their own main-thread lane (FEAT-PERF-31). A downloaded texture is bound to its faces on the main thread, which takes 1–5 ms, but it waited in the one shared queue behind unrelated work: 23–52 s in our measuring runs (part of that was the diagnostic probe mentioned above). It now has a lane of its own with a 4 ms per-frame budget, and the measured wait fell to 0.1–1.6 s. This is what brought the warm arrival from about 72 s to about 12 s.
  • Meshes come over our own HTTP client (FEAT-NET-07). LibreMetaverse's mesh queue let about 10 meshes per second through; on a cold visit to a crowded region they took over 11 minutes to arrive. Our own client with a 16-slot, priority-ordered gate delivers about 100 per second, and the meshes of that region were there in about a minute. Texture download slots are priority-ordered too (they were first come, first served). LibreMetaverse's own mesh cache is no longer consulted; SLNG's mesh disk cache is, so a mesh that was only in the old cache is fetched once more.
  • The avatar under your camera loads first (FEAT-PERF-27). Double-click a person in the radar, Alt+Click them, or simply zoom or walk up to them: their rig, clothes, bakes and textures are served ahead of the rest of the queue (at most three items in a row, so everything else still progresses). That avatar is also exempt from the "Max fully rendered avatars" limit while you look at it.

Avatars

  • Avatars over the limit show their bakes (BUG-AVATAR-19). A reduced avatar (one beyond "Max fully rendered avatars") was drawn in one flat jelly colour and its skin and clothes bakes were never fetched, so in a crowd most of them stayed grey for good. They now request their head, upper body, lower body, eyes and hair bakes while on screen and show each part as its bake arrives; the flat colour only stays until then. Where a bake hides a body part with alpha, the jelly colour fills in, so there are no holes or black patches; hair and eyelashes keep their cut-out. The bakes are prepared at the avatar's real size on screen, so the memory shrink pass can cut them under pressure. In the test region the number of reduced avatars still without a bake after 60 s dropped from nearly all of them to 0–1.
  • Worn rigged clothes bind their normal and specular maps (BUG-AVATAR-16). Clothes with a legacy material (normal map plus specular map) looked like flat, glossy plastic next to Firestorm, because those maps were never applied on avatars. They are now, together with the viewer's own highlight shape, so creases and a soft satin sheen replace hard, mirror-like spots. No extra draw calls. --diag prints a [WornMaps] line per face.

Accounts

  • Away and auto-response belong to one login (BUG-UI-43). The away, busy and auto-response texts, their switches and the idle timeout (Preferences › Chat & IM › Away & auto-response) were one shared setting, so a text saved as one avatar showed up and answered instant messages as another. They are now stored per grid and avatar. The first time an avatar logs in with no setup of its own, the old shared values are copied in once; they are never overwritten afterwards, and switching avatars without a restart loads the right set.

Network

  • No false "region stopped delivering events" warning for a region you already left (BUG-NET-37). LibreMetaverse keeps polling the event queue of a region it has disconnected from, and the answer "cap not found" (1,705 times in one session) was shown as a stalled region although it affects nothing you can see. The warning is skipped for any address that is not a connected region.

For testers and developers

  • A time base for arrival (FEAT-PERF-28). Every --diag line carries t=<seconds>; one [Arrival] line per region entry gives the moments when every full avatar has all its bakes, when no face waits for a texture and when the texture queue is empty, each with the megabytes until then; [TexWait.<class>] splits the waiting time into own avatar, focus avatar, other bakes, other worn items and scenery; [VramTerms] shows why the texture budget moved.
  • Per-stage texture timing (FEAT-PERF-30). [TexStage.<stage>] times each texture through Pool, Copy, Disk, DecodeWait, DecodedRead, Decode, Net, PrepWait, Prepare, QueueWait and Upload. tools/arrival_summary.py also prints "settled"; tools/ab_compare.py prints one line per run for A/B comparisons.
  • Fetch path counters (FEAT-NET-07): [MeshPipe], [MatPipe], [TexHttp], [TexWait], [LegacyMatPipe], [NamePipe], [WearablePipe] and [TexStream]. --tex-slots=N and --mesh-slots=N change the slot counts for A/B runs (only with --diag).
  • Queue wait per label (FEAT-PERF-32): [WorkCost] reports how long each kind of main-thread item waited. --no-bom-probe leaves out the Bakes-on-Mesh probes, which read textures back from the graphics card on the main thread and made up 98 % of the avatar material work in --diag runs; tools/baseline-run.ps1 leaves them out by default.
  • [FocusAvatar] under --diag reports how long the focus avatar took to complete.
  • A flaky unit test fixed (BUG-CACHE-02): the disk cache's start-up scan raced a test and failed CI at random. Test only, no change in behaviour.

Not yet confirmed in-world

  • The final build with streaming as the default was not walked through by eye. The A/B ran the same code with the switch on, and the maintainer's visual check with it on found nothing wrong.
  • Real answers of the asset server to Range requests (206 with Content-Range) are tested against a stand-in server in the unit tests and exercised by the in-world runs, but nothing asserts them.
  • The look of reduced avatars with their bakes (holes, black patches, sharpness once an avatar is promoted to full) has not been judged by eye, and no screenshot was taken.
  • Legacy normal and specular maps on worn clothes are confirmed by the self-test and by reading the viewer source; whether satin and creased fabric now look like Firestorm's is not yet confirmed in-world.
  • The focus-avatar priority was measured only through the work queue, not as "how long until the avatar I zoomed on is complete" in a crowd.
  • Away and auto-response per login is covered by unit tests and the self-test; the check with two real avatars logging in one after the other is still open.
  • BUG-NET-37 has no in-world confirmation yet.
  • Bakes are slower in some runs than in others (14.8–28.6 s and 14.2–46.6 s in two test sets); the spread is not explained.

Still missing

  • Bakes still take about 21–24 s from arrival until every full avatar has all of them, against a target of 15 s. Warm arrivals take as long as cold ones here, although nearly everything else is done in 12 s.
  • The graphics memory budget falls to about 4 GB during an arrival, and outfits can be unloaded under that pressure in crowded places. Nothing was unloaded in the test region; a more crowded place has not been measured.
  • A texture's transparency type is decided on the coarse picture and not again after it sharpens. In an offline check of 33 textures with transparency, 3 fully opaque 2048² textures looked transparent at 64 px and keep the alpha-cut shader for good: they look opaque but leave the opaque fast path.
  • Frame rate was lower in the last measuring runs (18–21 fps and 7–9 low 1 %, against 20–25 and 10–12 earlier). The probe is ruled out as the cause; machine load, the driver or a later change are not checked.
  • A worn HUD is sometimes blurry (BUG-RENDER-54). It was seen before streaming too and is not investigated yet.
  • Rigged wings worn by another avatar can float above the head instead of sitting on the back (BUG-AVATAR-20); only recorded.
  • The experimental separate render thread can still freeze the viewer on NVIDIA cards (seen twice). The fallback recovers on the next start; the cause is not found. Keep Render thread on "Main thread" to avoid it.
  • About 4 ms of every frame in a crowded region (the part of the scene update that is not avatar animation) is not accounted for yet.
  • A landmark list with online status and an "offline" filter (FEAT-UI-78).
  • Hundreds of Leaked unsafe reference lines for shader materials can appear when the viewer quits after a long session; the cause is not found yet.

Verification

  • The solution builds in Debug and Release and the client builds in Debug, without warnings.
  • 4,296 unit tests green (352 assets, 2,599 core, 1,345 net; up from 4,100 in v0.28.69), in Debug and in Release.
  • Self-test 196/196, including new checks for the focus avatar's queue priority, the wait measurement per label, the legacy material maps on worn faces and the away settings per account.
  • Shader globals consistent. dotnet format clean.
  • The arrival figures come from tools/baseline-run.ps1 runs (3 cold and 3 warm per set) in one test region on one machine.

Install

Download PurisViewer_Setup_v0.29.0-alpha.exe below and run it. It updates an existing installation in place.