ECI: Efficiency
My plan for this post is to record important information about how to make Easy CSV Importer efficient. It is a hard plugin to get the right balance especially when using functions such as eci_log which is used throughout the plugin. It is used many times in the post creation functions, meaning post creation has a lot more work to do when using this function which makes entries too a text file. So we need to explore the best ways to providing debugging and notification systems while giving the option to not use them or even remove them from the code.
WordPress Hooks, ECI Hooked Functions
The first place to look is the eci_i_variables.php file found in the includes folder. There you will find a constant namedĀ ECI_EFF_HOOKSFILE. This constant is used in easy-csv-importer.php, currently line 58. It is used to include or avoid including the eci_i_hooks.php file. The hooks file contains all the hooks and automated functions (they were moved to this file to make this work) so that anyone not not using scheduling can avoid loading the file.
if( ECI_EFF_HOOKSFILE ){require_once(‘includes/eci_i_hooks.php’);}
That is the line that calls the hooks file. You could simply remove it if you never plan to use what the hook file includes.
Currently Included In Hook File
- Edit Post Sync: the function that updates project database table with your manual changes on Edit Post screen
- Widgets: at this time no longer supported due to lack of demand, but eventually widgets will come again
- Void Record: updates project table to indicate a record should not be used again, this is triggered when manually deleting a post
- Schedule Data Import and Post Creation: triggered by the same function, if you want to spread your project out you need to include the hooks file