The Sparse ContentManagerImpl is not sophisticated enough to allow
arbitarty property sizes upto TB in size without any overhead. That
was a positive decision, made to avoid lots of complexity. I still
think that was the right decision.
Why are you getting more than 64K in a ContentItems properties?
That's a *big* object to be cached in memory, if there were millions
of them it would have a big impact on memory usage.
Ian
> --
> You received this message because you are subscribed to the Google Groups
> "Sakai Nakamura" group.
> To post to this group, send email to sakai-...@googlegroups.com.
> To unsubscribe from this group, send email to
> sakai-kernel...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sakai-kernel?hl=en.
>
64K is a very large HTML page, I have a feeling you can fit Hamlet
into that provided you dont go wild on markup.
Ian
I had to check: http://www.gutenberg.org/ebooks/1524
;)
--
D. Stuart Freeman
Georgia Institute of Technology
-chris
I dont think we have the resource to do this at the lower levels and
make it work.... its quite a large re-write of the insert and get
methods in the drivers.
Ian
64K is actually quite small for a real-world web page. Consider that
many users will create pages by pasting in from MS Word, where just a
couple of text pages can easily reach that size and larger.
-chris
This will have to be off by default since it may have a bad impact all
over the place.
On write, if a String is over a limit it will be written as a
LongString, which will be a reference to a file on disk. Once that
happens, it will be ignored for all sparse indexing although might
still be Ok for Solr indexing.
When its read it will come out as a LongString and provided its not
referenced anywhere in the Nakamura code base it will make it all the
way out to json.
If it is referenced anywhere in the Nakamura code base it will cause a
ClassCastException (since a LongString cant be cast to a String and a
String is final). That will randomly break random things and its quite
likely that those breakages will be masked by other error handling,
which is why, it I can get this to work at all, it will be off by
default, turned on at your peril.
Also, once a big string is in the DB, the only way to convert it back
to a String will be to delete the property and re-create it. I haven't
tried to write this patch yet and I may have missed something in my
thought process that make it impossible. The CastCastException is the
real blocker, caused, in part by abandoning the original design that
used coercion of data types rather than direct class casts.
Ian