On a Symfony exploration project, I have a model using doctrine NestedSet behaviour. Since the data is prepared in a flat file, I wrote a conversion utility to generate corresponding YAML. It turns out that processing NestedSet YML of around 100 records (max_depth=4) consumes over 40MB of PHP memory, which is not available to me.
Is there a work-around to this problem?
I'm thinking of 2 possible solutions.
- Write an equivalent PHP script to populate objects & save them
- Insert data via SQL statements, the challenge being to compute the left & right nodes
What do Symfonians suggest?