MaterialsImplDiscussion
From OpenSimulator
(Difference between revisions)
(→Approaches) |
|||
Line 8: | Line 8: | ||
= Approaches = | = Approaches = | ||
+ | ==Store materials data as temporary assets until persistence definitely required= | ||
+ | |||
==Store materials data in memory cache until persistence definitely required== | ==Store materials data in memory cache until persistence definitely required== | ||
Materials are kept in a purely in memory cache and only added to the asset service when required due to | Materials are kept in a purely in memory cache and only added to the asset service when required due to | ||
Line 18: | Line 20: | ||
=== Cons === | === Cons === | ||
+ | * All possible persistence triggers need to be hooked by the module. It might be possible to simplify this by hooking at the point where existing code asks for an object to be serialized, though this won't cover the case of simulator shutdown. | ||
* Cache needs to be managed (chiefly removal of items when no longer required). | * Cache needs to be managed (chiefly removal of items when no longer required). | ||
=== Pros === | === Pros === | ||
* Materials can be rapidly changed without [de]serialization or asset storage overhead. | * Materials can be rapidly changed without [de]serialization or asset storage overhead. |
Revision as of 10:57, 4 July 2014
Contents |
Introdution
justincc's notes on alternative possibility for materials implementation
Background
Materials are serialized OSD.
Approaches
=Store materials data as temporary assets until persistence definitely required
Store materials data in memory cache until persistence definitely required
Materials are kept in a purely in memory cache and only added to the asset service when required due to
- region cross
- teleport (if on attachments)
- IAR saving
- OAR saving
- simulator shutdown
Cons
- All possible persistence triggers need to be hooked by the module. It might be possible to simplify this by hooking at the point where existing code asks for an object to be serialized, though this won't cover the case of simulator shutdown.
- Cache needs to be managed (chiefly removal of items when no longer required).
Pros
- Materials can be rapidly changed without [de]serialization or asset storage overhead.