How to calculate a candidate block for mining using bitcoind RPC (without getBlockTemplate) and having into acount MAX_BLOCK_SIGOPS

I’m trying to calculate candidate blocks without using getBlockTemplate. Im using the data returned by bitcoind RPC, but I can’t find a reliable way to get the required signatures per transaction in the mempool. The only way I see to get reqSigs (required signature) of a transaction output is via getRawTransaction. So: -If I get…