For the most part, the time complexity of an API command is linearly related to the input and/or output size (plus some possible fixed amount). But there are some exceptions, for example:
- Any command which performs a significant rearrangement of the blockchain (e.g. setlastblock).
- Many commands which relate to the wallet, including getting balances and building new transactions, grow in linear time with the number of UTXOs (unspent transaction outputs) in the wallet. This count can be obtained from getwalletinfo.
- API calls that can perform an optional blockchain rescan (e.g. subscribe or importaddress) are linear in the number of blocks to be rescanned.
If you have a question about any specific API command, feel free to ask.