Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

implement Query::iterate #425

Open
dbu opened this Issue · 6 comments

2 participants

@dbu
Collaborator

Implement the Query->iterate method which will return an IteratableResultSet as per the ORM.

@dbu dbu added feature query labels
@juzerali

:+1: I am surprised it isn't there already. I keep hitting memory limits whenever I have to rebuild my elasticsearch index from the database. Surprisingly detaching while iterating during a foreach doesn't free up memory.

@dbu
Collaborator

you are welcome to do a PR to implement the feature ;-)

@juzerali
@dbu
Collaborator

detach should free the memory normally. are you sure you don't keep any references elsewhere?

you could try to call $dm->clear() to wipe the whole document manager when you are doing batch processing. maybe we have an issue with the detach that we don't free everything. does clear work better?

@juzerali
@dbu
Collaborator

if $dm->clear does not help then i strongly suspect that you keep references to the objects somewhere else in your code that prevent garbage collection from working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.