Add optimization for libraries-db task module