The object you're saving is large. - Makes site extremely slow

Hello to everybody, on our team we've been developing for plone some years from now. Now we have to face a problem that we've never seen before, the warning the python console is printing is the following:

/opt/Plone-4.3/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/Connection.py:660: UserWarning:
The <class 'oursite.contenttypes.content.ourcontenttype.Ourcontenttype'> object you're saving is large. (39924781 bytes.)

Perhaps you're storing media which should be stored in blobs.

Perhaps you're using a non-scalable data structure, such as a
PersistentMapping or PersistentList.

Perhaps you're storing data in objects that aren't persistent at
all. In cases like that, the data is stored in the record of the
containing persistent object.

In any case, storing records this big is probably a bad idea.

If you insist and want to get rid of this warning, use the
large_record_size option of the ZODB.DB constructor (or the
large-record-size option in a configuration file) to specify a larger
size.

  warnings.warn(large_object_message % (obj.__class__, len(p)))

On the site we are developing the client has a lot of content (+50k items), and we have always built our content types from the AT module ' Products.ATContentTypes.content' using the classes folder, base and schemata, and we translate every content that the user could introduce by himself as a folder if the content can contain items, or an item if the object just saves attributes for itself.
And here appears the problem, we finish with folders with +50k items, website becomes extremely slow and the warning before appears at console. I've been looking for information about this and i found something about PersistingMapping and BTrees, but i don't figure out how should i implement BTrees in our objects to make the site just work correctly, navigate between folders takes like 10 seconds delay.

So any advice of how make fast a site with a lot of items stored will be appreciated.
Thanks for taking the time to read!

The error message does not have a direct relationship with the responsivness of the site. In general large data (however you define large) should be stored as ZODB blobs (plone.app.blob) which is the default implemenation for Image and File type.

In addition to that: folders in Plone 4.3 are already btree-based and should provide a reasonable performance.
However storing 50k in one does not make much sense from the navigation point of view. Use nested folders based on critera in order to make the navigation managable.

-aj

Hello Andreas,
The folders with 50k items are not supposed to be navigated, we apply views into this folders to filter the content, would have any improvement in the performance divide the items into folders?

it depends how your custom view does the filtering. If your code loads every object to determine if it should be viewed or not, that would explain your performance problem. To prevent that you need some kind of index (plone catalog) or something custom, which means you load very few objects to do the filtering.