Skip to content

Improve performance

the-djmaze edited this page Dec 14, 2022 · 18 revisions

If SnappyMail feels very slow or sluggish we need to find out why that is. Using the full debug mode and analyzing the log, you may find the issue and probably a solution.

First turn on debugging and Login

  1. Go to Admin -> Config and find the option debug and turn it on. Then at the bottom hit the Save button.
  2. Open a new browser tab and login with an email account.
  3. When fully loaded go back to Admin and turn off the debug mode to prevent noise of other logging.

Analyzing the log

Open the log at _data_/_default_/logs/*.txt and we will walk you through the process.

Setup connection speed

IMAP[INFO]: Start connection to "tcp://localhost:143"
IMAP[DEBUG]: 0.00046396255493164 (raw connection)

This is the time it took to make a connection with the server.

IMAP[INFO]: < * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.\r\n
IMAP[DEBUG]: 0.0017571449279785 (*)

This is the time it took to the connection and get the first response from the server. If the response doesn't have [CAPABILITY, the next question to the server is IMAP[INFO]: > TAG CAPABILITY\r\n to get all capabilities.

Requests speed

Now the connection is fully set and we go ask the server to STARTTLS or AUTHENTICATE.

IMAP[INFO]: > TAG AUTHENTICATE PLAIN Base64==\r\n
IMAP[DEBUG]: 0.27842593193054 (TAG)

This is the time it took to login on the server.

Now each additional request is the same way:

IMAP[INFO]: > TAG ....\r\n
IMAP[INFO]: < ...\r\n
IMAP[DEBUG]: 0.27842593193054 (TAG)

Finished total speed

And finally it ends with the LOGOUT and the total time it took.

IMAP[INFO]: Disconnected from "tcp://localhost:143" (success)
IMAP[DEBUG]: 0.28226494789123454 (net session)
Clone this wiki locally