Improve performance by using drush functions instead of Drupal module functions I am trying to improve the import performance of a drupal website we are working on.  The site makes use of the queue api to import individual items.  Currently this process is very slow.  I have hear it mentioned that one way of improving performance is to process items using drush rather than having Drupal do it directly.

What our site does is read the contents of a text file and then add each item to a queue for processing.  The queue worker function just takes the information, performs some processing logic and then saves it as a node. 

From what I understand we would want to move this queue worker function out of the current Drupal module and into drush. 

I have been searching for general background information on how to do this or some introductory tutorials, but have not been able to find anything about using drush to improve performance of resource intensive tasks.  I am a little surprised that there is so little information on this given that it is supposed to improve Drupal performance.
Queues are defined within Drupal modules, and you can use drush to run those queues:

drush @site queue-list
drush @site queue-run queue_name


Changing the interface to the import code (queue, batch api or a drush command) won't affect drastically the import time.

I'd review the import code to try and optimize it. For example by caching (in memory) any data you may be loading recurringly from the database.