I've written a number of Perl clients using the Perl API and have done some profiling. I've found that the call to Search::Elasticsearch::new() can take more than 50% of the total execution time. I'd like to speed this up some how. Any suggestions?
One thought I had was to have a proxy application that keeps an instance of an ES object and then some how pass that object to my clients so they don't have to instantiate their own. Is that possible some how? Or maybe there's a better solution.