I have been doing some benchmarking on an import script I have been writing. The steps are:
1) open a text file
2) parse it into an array
3) create some simple products using models and save.
As an average I get around 0.39 seconds per product to load the model, add the data and then save (with some try/catch). 0.35 seconds of this time is the $model->save() method - which is clearly ridiculous! Magento is supposed to be enterprise level software - how on earth can it take 0.35 seconds to save a model?
I am now thinking about writing custom SQL to do the import - however if in future releases Magento is updated my scripts will break which is a bit of a pain.
Am I missing something or is there something really clever magento is doing under the hood which is time consuming but necessary? Because this is clearly why the import script is taking forever when loading from a CSV file.
Version is 1.17 by the way.