On 10/28/2015 06:53 PM, Michael Hunger wrote:
> Yes, Neo itself internally can handle byte[] just fine.
>
> there would be a need for a toBytes(base64String)  function to handle it.
>
> What's your use-case?
>
> I think the 3.0 binary API will have support for byte[] too.


It's that nasty really-long-string case we talked about - where I would
like to store them as compressed byte arrays...

Any chance they'll fix this horrible storage layout for large attributes
in 3.0?

Given how slow long strings are in Neo4j, storing them compressed would
speed handling them by a factor of the compression ratio - which seems
to run 5:1 or better...

Today I started moving those huge attributes to be in their own nodes so
that they don't travel over the REST interface except when I know I want
them.

There's an N^2 kind of thing that goes on now...

I add an 20K string attribute
I add another 20K attribute - which involves fetching 20K and writing 40K
I add another 20K attribute which involves fetching 40K and writing 60K

and so on and so on...

And since every 60 bytes of the attribute requires a round trip to the
disk, the performance is beyond horrible...
A 20K attribute takes at least 333 round trips to the disk to fetch(!).
Since it's a linked list, they have to be performed one at a time...

So, the first time, it takes 333 disk accesses to retrieve, then 666,
then 999, then 1332 and so on as more long attributes are added to the
nodes.

It makes simple queries take /seconds/ to perform.

Now at least, there shouldn't be any N^2 stuff going on.

It's still slow, but shouldn't get worse and worse like it does now...

What I did turns out to have been stupid.
The implementation of strings > 60 bytes is REALLY stupid.

The result was not 2*REALLY*stupid, but instead was REALLY*(stupid)^2).


-- 

Alan Robertson / CTO
[email protected] <mailto:[email protected]>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to