nylas / nylas-mail

:love_letter: An extensible desktop mail app built on the modern web. Forks welcome!
https://nylas.com/nylas-mail/
MIT License
24.81k stars 1.38k forks source link

Slow Performance / Lots of Lag When Typing a Response in Composer #1069

Closed xoniq closed 8 years ago

xoniq commented 8 years ago

I experience a lot of slowdowns while typing a reply in a simple conversation. During typing is goes slower and slower. I don't see increased CPU or RAM usage. It's only the typing, if I select something using the keyboard it's just fine.

bengotow commented 8 years ago

Hi @crxdelsol — thanks for reporting this. To help us narrow this down, could you add:

There are a few composer performance improvements on our roadmap but it shouldn't be unbearably slow - seems like something else must be up.

xoniq commented 8 years ago

Hi!

After a few lines I started to notice a little slowdowns in showing up characters which are getting worser and worser after a few more lines of typing. Then it will be too slow and I start making spelling mistakes because I don't see the text appear soon enough. Then I switch to my IDE (developer job) to type my message and copy+paste the text into the e-mail.

For the record:

Device: Retina MacBook Pro late 2014 (model: MacBookPro11,1) Display: Internal MacBook screen: 13,3-inch (2560 x 1600) CPU: 2,6 GHz Intel Core i5 RAM: 8 GB 1600 MHz DDR3 Video: Intel Iris 1536 MB SSD: APPLE SSD SD0128F OS: 10.11.3 bèta (15D13b) (Also had this before on retail versions of El Capitan)

xoniq commented 8 years ago

For the record, I also tested this on the latest version:

0.4.9-575c091 (0.4.9-575c091)

Some new analysis, this only occurs to a specific e-mail account. Other accounts do not have this issue so far as I have been able to test today.

If I send an e-mail from that account to another one of mine, and from the other I respond to it, also no issue there. It's only directly noticeable after 2 lines of text when I compose in that one specific e-mail account.

dennisjanssen commented 8 years ago

Same issue here, on a pretty similar machine (Macbook Pro on latest OSX). Speed varies a lot, so it's not all the time, but at times it's really slow. A few minutes ago, I managed to type 3 full sentences and then had to wait about 30 sec. for everything to appear.

Popping out the external composer isn't really helping, still pretty sluggish while typing.

mrelwood commented 8 years ago

First time user, version 0.4.25-a22631a. Same issue, and in my case it is the spell checker. Typing in English is fine, but using my native Finnish typing gets very sluggish after one single sentence.

An option to remove the spell checker completely, please.

dennisjanssen commented 8 years ago

@mrelwood That makes a lot of sense, other native language than English here as well. So +1 on that.

happylinks commented 8 years ago

Same here, typing dutch makes it really slow.

grinich commented 8 years ago

Is this still happening in the latest release?

xoniq commented 8 years ago

I am currently downloading N1 again. The latest update screwed up my current installation. The splash screen comes up, it starts drawing the main window, and crashes, showing the splash screen again, over and over.

(Video here: https://dl.dropboxusercontent.com/u/7528392/n1-crash.mov)

EDIT

Bummer, this will take a while, replacing the installation with a new version does not fix this issue. I have to delete every reference to this application, and hope this solves it, then I have to add all my emailadresses again.

EDIT 2

Complete de-install did not solve the start-up issue. Will try to find a solution soon. Currently I am completely unable to start N1.

EDIT 3

No way to get around this. N1 is currently permanently unuseable. After I managed to kill it, this appeared in Console:

WindowManager: Preparing a new 'composer' window``

Looks like one day it failed starting the application to automatically show composer window, and it keeps hanging there.

EDIT 4

Finally got N1 to start completely over from scratch, latest version. I only added my mail account having the speed issues, and even with only this account enabled; the speed issues are still there.

This is what I typed in Dutch, the last words took quite a while.

Dit is een test. Om te kijken of er nog een vertraging is.

Als in English the performance is terrible:

This is a test. This is for testing if the slowdowns during composing are still available in latest release.

mrelwood commented 8 years ago

It still happens on 0.4.25-a22631a, although perhaps to a slightly lesser degree.

- mrelwood.

On Apr 27 2016, at 9:44 pm, Michael Grinich <notifications@github.com> wrote:

Is this still happening in the latest release?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

happylinks commented 8 years ago

Still happening, can't send dutch emails at all; takes minutes before the typing is "finished".

happylinks commented 8 years ago

Also happens when I type in english or just nonsense (asdfasdfasdf).

grinich commented 8 years ago

This seems to be occurring when the OS locale is set to non-english and we're running the spell checker.

xoniq commented 8 years ago

Would it be possible to adjust the spell checker language to the system default?

bengotow commented 8 years ago

Hey folks - I've made a few changes in 15ef74e0e2063dce732a7e983d3676a069fbcc6b which should bound the performance cost of the spellchecker (by capping it at finding 15 mis-spellings) and cut down on needless DOM node creation. I think this is still a major issue and we'll look at doing a broader overhaul soon.

xoniq commented 8 years ago

I just updated to this version:

0.4.40-85cf726

It's a bit better now, but still quite a lag after a few sentences. Perhaps adding an option to disable spell checker completely in N1 settings would be a solution to some.

amebru commented 8 years ago

I have the same issue and it is clear that it is also the spell checker that is the problem: my system language is set to french, typing in french in Nylas is fine, but typing in English creates spelling errors and causes sluggishness. It is better now, but still annoying --- I would certainly like an option to disable the spell-checker, at least as a temporary quick fix.

jackiehluo commented 8 years ago

Just added https://github.com/nylas/N1/commit/42e876ab1f99270b003e6ed7bc5e8fe055b1c54c, which should be a temporary fix for the performance issues and the lack of language detection from #1392. We're still looking at real solutions for both!

jboykin commented 8 years ago

I have this issue too on Windows 10 Surface Pro 4, it's pretty bad. Locale is United States, language is English.

emorikawa commented 8 years ago

Additional info on this bug can be found in: https://github.com/nylas/N1/issues/2507 and https://github.com/nylas/N1/issues/1360

emorikawa commented 8 years ago

Here's a profiler snapshot from @GM-Polyakov machine. This was captured on a large thread with 43 replies, even when quoted text was collapsed. We're clearly doing something dumb with parseFromString causing serious lag on large threads.

output-profile

jackiehluo commented 8 years ago

Another incidence: https://nylas.zendesk.com/agent/tickets/4362

jackiehluo commented 8 years ago

Another incidence: https://nylas.zendesk.com/agent/tickets/4077

jackiehluo commented 8 years ago

Another incidence: https://nylas.zendesk.com/agent/tickets/4362

clifgriffin commented 8 years ago

I can't even get the reply window to open up these days. Takes 10 minutes to show, and then it generates one for every time I clicked.

I've had to switch to something else for now. Just too slow.

jackiehluo commented 8 years ago

Okay, this issue should be at least partly fixed with this commit: https://github.com/nylas/N1/commit/87dba382a8779c95c0a4e975cf5af8cc8a667661

We narrowed down on a serious lag that occurred when you tried responding to long email threads or HTML emails—if your problems were occurring in different circumstances (i.e., replying to a single email that only contained text), let us know!

jackiehluo commented 8 years ago

Hey! We've pushed an update (0.4.47) that should fix this issue—let us know if you see it again! Thanks!

happylinks commented 8 years ago

I still see this issue in version "0.4.47-3a2a94c (0.4.47-3a2a94c)". Whenever I draft a new email the text gets really slow when I've got more than about 4 sentences. So, not only in response to a email.

jackiehluo commented 8 years ago

@happylinks Does it help if you disable spell check in the settings?

happylinks commented 8 years ago

@jackiehluo After turning off the spell check and restarting (important) it isn't slow anymore.

samgabell commented 7 years ago

Why is this issue still closed? Are you suggesting the fix is to permanently disable spell checker?

bnsblue commented 7 years ago

Same question: why is this issue still closed? Have you guys figured out/fixed the performance bug mentioned in @emorikawa's post? I am still experiencing huge lag when the spell check is enabled.

grinich commented 7 years ago

@bnsblue Yes, we fixed the lag from the previous issue.

General bugs for things like "slow performance" aren't useful to keep open. They're similar to things like "make the design better" or "make the binary smaller" etc. without specific issues or goals.

If you are still having issues with lag, please open a new issue with info about your system, how the issue is presenting itself, and full detail about what you're typing and how long the draft is. Screencasts are great and reproducible scenarios are best.