Electrum address syncronization I need to periodically check the balance of a number of bitcoin addresses (a few tens or hundreds addresses).
I noticed that Electrum may syncronize a thousand or more imported addresses in a matter of a few seconds. But I failed to realise how it is done searching through Electrum source code. 

Which methods it uses? Does it really import all these addresses into currently connected remote node and then calls listunspent no matter how many addresses I insert into the wallet?

Can you please point me to a code snippet that implements such funtionality
Electrum wallet requires a special Electrum compatible server where it can query the data needed.

There are now several implementations eg:


https://github.com/spesmilo/electrum-server
https://github.com/chris-belcher/electrum-personal-server
https://github.com/kyuupichan/electrumx



  ...code snippet that implements such funtionality


https://github.com/spesmilo/electrum-server/blob/ce1b11d7f5f7a70a3b6cc7ec1d3e552436e54ffe/src/storage.py#L286