user63569: getrawmempool returns only TXID (verbose off), what I'm doing is calling getrawtransaction for each transaction ID to get a transaction hex.
Bitcoin core doesn't support batch requests and each RPC call takes 0.06 sec, for ~ 5000 transactions, it takes 5 min which is so expensive. 
can I get mempool transactions as hex instantly? 

user12983: Are you sure you need Bitcoin Core and RPC calls for this task?
May be you need some tool for sniffing bitcoin network for all transactions. Have a look to this: https://github.com/sebicas/bitcoin-sniffer 
This tool is very old. I am not sure that it works today. Take the main idea.

Another solution is implementing your own RPC-command. Something like "dumpwholemempool". I think it is not too difficult.

user48884: 
Bitcoin core doesn't support batch requests

Yes it does. Bitcoin Core uses the follows the JSON-RPC Specification for batching requests. Just use that with a custom client of your choice to interact with the RPC server to get that information. python-bitcoinrpc makes this easy to do.

63569: <p><code>getrawmempool</code> returns only TXID (verbose off), what I'm doing is calling <code>getrawtransaction</code> for each transaction ID to get a transaction hex.</p>

<p>Bitcoin core doesn't support batch requests and each RPC call takes 0.06 sec, for ~ 5000 transactions, it takes 5 min which is so expensive. 
can I get mempool transactions as hex instantly? </p>
 12983: <p>Are you sure you need Bitcoin Core and RPC calls for this task?</p>

<p>May be you need some tool for sniffing bitcoin network for all transactions. Have a look to this: <a href="https://github.com/sebicas/bitcoin-sniffer" rel="nofollow noreferrer">https://github.com/sebicas/bitcoin-sniffer</a> </p>

<p>This tool is very old. I am not sure that it works today. Take the main idea.</p>

<hr>

<p>Another solution is implementing your own RPC-command. Something like "dumpwholemempool". I think it is not too difficult.</p>
 48884: <blockquote>
  <p>Bitcoin core doesn't support batch requests</p>
</blockquote>

<p>Yes it does. Bitcoin Core uses the follows the <a href="http://www.jsonrpc.org/specification#batch" rel="nofollow noreferrer">JSON-RPC Specification for batching requests</a>. Just use that with a custom client of your choice to interact with the RPC server to get that information. <a href="https://github.com/jgarzik/python-bitcoinrpc" rel="nofollow noreferrer">python-bitcoinrpc</a> makes this easy to do.</p>
