Sparrow.Collections.FastList and BittableJsonReaderObject stays in memory after query?

74 views
Skip to first unread message

Victor Potatis Maximus

unread,
Aug 1, 2018, 5:41:55 PM8/1/18
to RavenDB - 2nd generation document database
Hello, i'm trying to query a list of documents, which only has one long property.
The list can be anywhere from 500,000 to 10,000,000 documents in size, but in this example there's 524,602 documents.
After my query has completed i'm stuck with a bunch of sparrow and ravendb objects, which never seems to be collected by gc or something.
They're quite substantial in size compared to the actual list i queried, so it's kind of a big issue for me application.
Please have a look at the attached image of a memory snapshot.

Edit: Reuploaded because i can't share project name
InkedScreenshot_156_LI (3).jpg

Maxim Buryak

unread,
Aug 5, 2018, 7:57:40 AM8/5/18
to rav...@googlegroups.com
Hi,
Here we are hitting an internal property cache edge case that forces us to create big amount of items without reusing it, due to the number of returned items (those will be reused in the next big query). 
There are several work arounds you could use:
1. Use paging
2. Use streaming


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oren Eini (Ayende Rahien)

unread,
Aug 5, 2018, 11:01:38 AM8/5/18
to ravendb
The general recommendation here is that you won't try to send tens of MB in a Query, that is going to cause high memory pressure on both server & client.
Because we need to hold the whole result as a single instance, Stream() is the preferred method to handle this scenario

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages