IntelliSense is very slow for code complete

I just switched from Atom to Vscode, and found that the “code complete” performs well when editing a small script, but acts very slowly in the case of editing a file, such as a function, belonging to a package. Any suggestion on how to improve it ?