secondlife / secondlife/viewer
Make message system threaded
Open
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
- 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.
- 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.
- 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.
What does this feature/enhancement do?
Move idleMessage out of main thread.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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