Avast gets very heavy on memory usage when it scans very large files.

Why do you think so? This is not normally the case…