Yes, I realize there is already #379854: The site map is not being populated, but that one has over 200 replies so can't possibly be related to this exact same issue. I also really don't want to subscribe to that thread since it gets replied to every half hour. ;P
The recent changes to add cron support to xmlsitemap_node, xmlsitemap_user, etc. added a variable for how many records to process on cron (that's good!). However, it defaults to zero, so none of the old content gets picked up on cron run (that's bad!).
Looking under the hood at xmlsitemap_node_cron() I can see why you did this, since you're selecting ALL published nodes and then looping through until $limit is down to zero. But I think that code can probably be refactored so you're doing a db_query_range() to only select $limit records from the node table instead.
Comments
Comment #1
webchickSorry, meant to put that as critical.
Comment #2
avpadernoIsn't the default value set to -1?
Comment #3
avpadernoI am changing the title.
I am not sure this can be called a bug; by default, the cron tasks are not used to populate the database table, but they can be enabled changing the settings.
What do you think the default cron limit should be?
Comment #4
Anonymous (not verified) commentedThe default limit should be 100. Off by default isn't good.
Comment #5
avpadernoThe default value for the cron limit has been changed in CVS.
Comment #6
dan.crouthamel commentedI have a question about this setting. Suppose the default is 100, but you have say 500 nodes. Does that mean 100 nodes are updated on night (cron runs), next 100 another night, etc?
Comment #7
dave reid@dan.crouthamel: That is correct. It will only run 100 each time cron is run, unless you specifically change that setting.