How to programmatically bulk alias node urls by using only drupal 7 core (with it's great batch API !)?
My question is actually how to make drupal use and recognise the aliases stored in url_alias table?
Background:
The project I work on has more than 200,000 nodes (Drupal 7) and aliasing the system default url of all those nodes would literally take years with pathauto module (10 aliases every 20 minutes). I tried everything to improve those performances but failed (tried different servers, different mysql optimisations, different patterns).
I have already the batch process functions up and ready, they alias 200,000 nodes in 20 minutes, they create clean aliases stored in table "url_alias". I took lots of time looking at pathauto code, but couldn't find or understand how the module was giving drupal the order to recognize the bulk updated paths.
Thank you for your hints, answers or ideas..much appreciated!
Here is function that will update aliases for all nodes of specified type