secondlife / secondlife/viewer

Make message system threaded

Open
#3,658 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog enhancement team:viewer
Dominant language
C++
Stars
299
Forks
146
Avg merge
1d 9h
Merged PRs (30d)
88

Description

Why is it needed

  1. Current implementation is hiting performance hard when teleportig, logging in or moving rapidly (like riding comunities). Good chunk of the problem appear to be caused by logging, but even without that idleMessage can take ~30ms per frame.
  2. Current implementation slows down avatar/mesh loading, attachment data packets can take significant time to get processed (up to 60s), time that could have been spent by mesh thread loading that data from cache or network.
  3. Another issue is 'dropped' packets. Packet ring is limited to 20ms per frame and if there are too many messages to process, viewer will drop packets that are old (60+s) and didn't cut it. Moving to a thread should give it more time.Image
    Image

What does this feature/enhancement do?

Move idleMessage out of main thread.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names idleMessage, the packet ring, and the main-thread processing path, but no files or tests. Start by tracing those entry points and documenting the thread-safety and ownership boundaries before choosing an implementation location. Done means idleMessage runs off the main thread without dropped packets or regressions in avatar and mesh loading.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop-dev, networking, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.