PrismarineJS/prismarine-viewer

Remove work from the main thread #157

3top1a posted onGitHub

I've been looking at the Lighthouse report for my viewer on 2b2t spawn (local, downloaded file), and the performance was terrible. Some of my findings after messing with the code:

  • Making all event listeners (controls.js) passive reduces input lag
  • AO is slower (models.js:202)
  • Basic material is faster (entity.js:174, worldrenderer.js:16)
  • With the rendering faster, the map also loaded faster

The last one is the most important one and the reason why some parts (rendering, io, etc) should be in another thread.

Here's an implementation example from a blog

Here's a test of time to load all chunks in 6 render distance. 1.15.1: 1m 51s My optimized version: 0m 28s

All done on a paper 1.12 server, on this world


do you plan to PR your optimized version?

posted by rom1504 about 4 years ago

When the reuse viewer pr gets merged, im going to add a simple renderer option

posted by 3top1a about 4 years ago

Also, the "optmised" version is just the findings applied

posted by 3top1a about 4 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests