Archiving mail seems to be faster if I'm offline

I’m importing 7Gb of a gmail account (already synced in apple mail). It takes about 2 days.

However, if I turn off wifi connection, the importing process cuts down to about 4 hours.

Is it skipping something or is this normal?

HTML emails could be talking to the outside world when the connection is active.

More likely is that Apple Mail tries to access the IMAP account too often, even if the emails are completely locally cached.