[OSM-dev] No new planet.osm files?
Immanuel Scholz
immanuel.scholz at gmx.de
Mon Oct 9 14:23:00 BST 2006
Hi,
> Swap cache: add 776211, delete 776211, find 2065432/2097947, race 0+0
> Out of Memory: Killed process 28432 (planet.rb).
>
> I think planet.rb is loading almost the entire node table in to memory
> before spitting it out.
>
> Nick you hacked on this right? Any way to make it row seek or something
> so it doesn't die?
I coded the reading-from-db part.
The probably offending rows are:
def all_nodes
$mysql.query "..." do |rows|
rows.each do |row|
...
If 'rows' is an Array, and this completly reads the data into 'rows'
before iteration starts, this is the place to change. If rows is of some
"cursor-like" type, this should be fine.
Can someone check this ("puts rows.class" before the rows.each...)? I have
no ruby environment here at hand.. :(
However, I don't know how it should look like instead. Does someone know
the MySQL API well enough?
Ciao, Imi
PS: Same for segments and ways.
More information about the dev
mailing list