Originally Posted by sotong
That is correct. I just did further testing again:
1. Flash back to stock 4.2.2 kernel. Wait 5 mins. Sent gmail to my phone. Notification did not come in until i turn the screen on.
2. Flash to your V1 kernel. Wait 5 mins. Sent gmail again, and i got the notification almost immediately.
I am also puzzled as to why this is happening. But i am not complaining! Will test your V2 now. Thanks for your efforts
Sending yourself a gmail turns out to be a very poor test. Invariably, if I send myself an email, notification delays are very random, and this has been confirmed by others on this board. However, getting emails from 3rd parties is much more reliable for delay testing. It may have something to do with "loopback" settings on the router. In any case, if you have a router which flushes its ARP cache every couple minutes, you will get delays (up to 15 minutes) because Google hasn't updated the wifi driver to offload ARP broadcast requests. They decided battery life was more important, so they chose to drop requests entirely when the screen is off.
Fortunately, if you have a dd-wrt router, you can set a static IP address from the router to get around this issue.