MantisBT - opensim
View Issue Details
0006626opensim[REGION] OpenSim Corepublic2013-05-08 13:152013-06-24 16:54
cmickeyb 
cmickeyb 
normalfeatureN/A
closedfixed 
master (dev code) 
master (dev code) 
601aa9116348a88e8fe4d33f7dd7408ddc6fee28
Grid (Multiple Regions per Sim)
BulletSim
Mono / Linux32
2.10
0006626: Refactor LLClientView to allow handling of CachedTexture packets in AvatarFactory
The attached patch adds an event and a method so that handling of the CachedTexture packet can be pulled out of LLClientView and moved to AvatarFactory. The first pass at reusing textures (turned off by default) is included. When reusing textures, if the baked textures from a previous login are still in the asset service (which generally means that they are in the simulator's cache) then the avatar will not need to rebake. This is both a performance improvement (specifically that an avatars baked textures do not need to be sent to other users who have the old textures cached) and a resource improvement (don't have to deal with duplicate bakes in the asset service cache).
No tags attached.
patch reusetextures.patch (19,580) 2013-05-08 13:16
http://opensimulator.org/mantis/file_download.php?file_id=3522&type=bug
patch 0001-Adds-support-for-comparing-texture-hashes-for-the-pu.patch (24,736) 2013-05-15 16:53
http://opensimulator.org/mantis/file_download.php?file_id=3529&type=bug
Issue History
2013-05-08 13:15cmickeybNew Issue
2013-05-08 13:15cmickeybStatusnew => assigned
2013-05-08 13:15cmickeybAssigned To => cmickeyb
2013-05-08 13:16cmickeybFile Added: reusetextures.patch
2013-05-08 13:16cmickeybStatusassigned => patch included
2013-05-15 16:53cmickeybFile Added: 0001-Adds-support-for-comparing-texture-hashes-for-the-pu.patch
2013-05-15 16:56cmickeybNote Added: 0023904
2013-05-23 12:18cmickeybNote Added: 0023932
2013-05-23 14:30justinccNote Added: 0023933
2013-05-23 14:30justinccStatuspatch included => patch feedback
2013-06-24 16:54justinccStatuspatch feedback => closed
2013-06-24 16:54justinccResolutionopen => fixed

Notes
(0023904)
cmickeyb   
2013-05-15 16:56   
The second patch exposes the cached texture hashes through the SetAppearance packet. This does mean a change to IClientAPI. The patch does not save the hashes in the robust store which means that its unlikely to help much with Robust deployments. With bakes persisted (even persisted in a disk based local cache for example) and the hashes persisted, then bakes on login should only happen if the appearance has changed since the last visit to a region. That has been verified with Simian where the appearance is saved.
(0023932)
cmickeyb   
2013-05-23 12:18   
FYI... the only reason ROBUST won't benefit is that hash saving is not hooked up in the appearance database code.
(0023933)
justincc   
2013-05-23 14:30   
A few minor comments for reusetextures.patch:

* I would say that in LLClientView.SendCachedTextureResponse() could require an IScenePresence rather than an ISceneEntity and then always doing a cast check. But it turns out the argument is entirely unused! Why is it there?

* Some of the argument lines don't have spaces after the commas (as per standard opensim coding formatting).

And for 0001:

* It would seem better to me to overload AvatarFactoryModule.SetAppearance() again rather than create a new AvatarFactoryModule.DoSetAppearance() even if the overload will be protected. All those other SetAppearance() methods do just call down to it after all (unless this kind of thing isn't allowed by the compiler).

As for actually storing and repopulating it in Robust, I believe storing could be done by adding key:value pairs to the Data dictionary in the AvatarData(AvatarAppearance appearance) constructor in IAvatarService. This Data dictionary is later used to fill out the entries in the Avatar db table.

Repopulating would be done in ToAvatarAppearance() in the same class, using the key:value pairs received back from the Avatar db entries. A sensible, extensible format which doesn't produce too bizarre XML (see [1]) would be great.

[1] http://opensimulator.org/wiki/AvatarService#getavatar [^]