Limit number of email msgs downloaded from Gmail

I don’t delete most email and have many, many messages in my Gmail inbox. I mostly use Mac Mail to read and send email, so whenever opening the mail program, all of the Gmail messages are downloaded, which takes forever. To limit the number of messages downloaded, but kept on the Gmail server, use the following:

Gmail>Settings (gear symbol)>See All Settings>Forwarding and POP/IMAP. Scroll down to Folder Size Limits and set the number of messages to be downloaded. It is currently set to 5,000.