optimize autoloader as post-install and post-update event