[Building Sakai] Questions about EntityEncoding maxLevel

Aaron Zeckoski azeckoski at unicon.net
Mon Mar 26 04:56:29 PDT 2012


Marc,
There is a patch to control it on a per provider basis here:
https://jira.sakaiproject.org/browse/SAK-21346

The limit is in place because on a complex object like a samigo quiz
or an assignment, it is possible to use up around a GB of memory with
a level around 10. The amount of memory used grows geometrically so
around 20, you will overrun the memory buffers in even the most robust
and modern computer, not to mention tying up system processor. In
general, this happens because the old Sakai entities are often self
referential or hibernate adds fields which create loops. Setting to 25
would probably take most any system down if the object graph doesn't
have distinct termination.

-AZ


On Mon, Mar 26, 2012 at 5:19 AM, Marc Savitsky
<marc.savitsky at oucs.ox.ac.uk> wrote:
> I am doing some work on a contentEntityProvider in sakai2.8 and found
> that I am coming up against a limit in the depth within my entity that
> is output.
>
> It seems that when transcoders are registered (in EntityEncodingManager)
> the JSON transcoder is set a maxLevel to descend the object.  There is
> code in EntityBrokerManagerImpl to allow this to be between 5 and 25.
> No max level is set in the xml and html transcoders, so these rely on a
> default, which seems to be set to 7.
>
> I can see that a max level may be useful if the entity loops but:
> Why is it necessary to have a different level depending on the output
> format?
> Is the absence of configurable levels for xml and html an oversight?
> Wouldn't it be better to configure the level by entity provider rather
> than across the board?
> What is the effect on performance if the max level is set to 25?
>
> many thanks
> Marc
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"



-- 
Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile


More information about the sakai-dev mailing list