about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* widgets/terminal: Only call vterm.ScreenCell.Attrs once in styleFromCellClayton Craft2021-04-131-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a substantial performance issue when scrolling emails with long/complicated contents, where scrolling down a single line can take something like hundreds of ms before the screen is updated to reflect the scroll. It's really bad if the email has lots of columns, e.g. like if it's an html email that was passed through a filter (w3m, etc) to render it. Using pprof, I found that the multiple calls to vterm.ScreenCell.Attrs() in styleFromCell were really really expensive. This patch replaces them with a single call. Here's a before and after with a simple, but very manual test of opening a large email with contents that went through a w3m filter and continuously scrolling up and down over and over for ~30 seconds: *** Before: ----------------------------------------------------------+------------- flat flat% sum% cum cum% calls calls% + context ----------------------------------------------------------+------------- 28.25s 100% | git.x2esr.x2eht..z2f..z7esircmpwn..z2faerc..z2fwidgets.PartSwitcher.Draw 0 0% 99.94% 28.25s 82.31% | git.x2esr.x2eht..z2f..z7esircmpwn..z2faerc..z2fwidgets.PartViewer.Draw 28.25s 100% | git.x2esr.x2eht..z2f..z7esircmpwn..z2faerc..z2fwidgets.Terminal.Draw ----------------------------------------------------------+------------- 28.25s 100% | git.x2esr.x2eht..z2f..z7esircmpwn..z2faerc..z2fwidgets.PartViewer.Draw 0 0% 99.94% 28.25s 82.31% | git.x2esr.x2eht..z2f..z7esircmpwn..z2faerc..z2fwidgets.Terminal.Draw 19.23s 68.07% | git.x2esr.x2eht..z2f..z7esircmpwn..z2faerc..z2fwidgets.Terminal.styleFromCell 6.04s 21.38% | github.x2ecom..z2fddevault..z2fgo..z2dlibvterm.Screen.GetCellAt 1.38s 4.88% | git.x2esr.x2eht..z2f..z7esircmpwn..z2faerc..z2flib..z2fui.Context.Printf 0.62s 2.19% | runtime.mapassign 0.43s 1.52% | runtime.mapaccess2 0.20s 0.71% | runtime.newobject 0.19s 0.67% | runtime.callers (inline) 0.07s 0.25% | runtime.makeslice 0.07s 0.25% | runtime.mallocgc ----------------------------------------------------------+------------- 19.23s 100% | git.x2esr.x2eht..z2f..z7esircmpwn..z2faerc..z2fwidgets.Terminal.Draw 0 0% 99.94% 19.23s 56.03% | git.x2esr.x2eht..z2f..z7esircmpwn..z2faerc..z2fwidgets.Terminal.styleFromCell 19.21s 99.90% | github.x2ecom..z2fddevault..z2fgo..z2dlibvterm.ScreenCell.Attrs *** After: ----------------------------------------------------------+------------- flat flat% sum% cum cum% calls calls% + context ----------------------------------------------------------+------------- 0.31s 100% | git.x2esr.x2eht/~sircmpwn/aerc/widgets.Terminal.Draw 0 0% 99.87% 0.31s 1.33% | github.x2ecom/ddevault/go-libvterm.NewPos 0.25s 80.65% | runtime.callers (inline) 0.04s 12.90% | runtime.gomcache (inline) ----------------------------------------------------------+------------- 8.40s 100% | github.x2ecom/ddevault/go-libvterm.Screen.GetCellAt 0 0% 99.87% 8.40s 36.11% | github.x2ecom/ddevault/go-libvterm.Screen.GetCell 7.14s 85.00% | github.x2ecom/ddevault/go-libvterm._cgoCheckPointer 0.54s 6.43% | runtime.callers (inline) 0.35s 4.17% | runtime.exitsyscall 0.11s 1.31% | runtime.deferprocStack 0.07s 0.83% | doentersyscall 0.07s 0.83% | runtime.getg 0.05s 0.6% | runtime.casgstatus 0.03s 0.36% | _init 0.03s 0.36% | runtime.gomcache (inline) ----------------------------------------------------------+------------- 8.46s 100% | git.x2esr.x2eht/~sircmpwn/aerc/widgets.Terminal.Draw 0 0% 99.87% 8.46s 36.37% | github.x2ecom/ddevault/go-libvterm.Screen.GetCellAt 8.40s 99.29% | github.x2ecom/ddevault/go-libvterm.Screen.GetCell 0.06s 0.71% | runtime.callers (inline) ----------------------------------------------------------+------------- 0.31s 100% | git.x2esr.x2eht/~sircmpwn/aerc/widgets.Terminal.styleFromCell 0 0% 99.87% 0.31s 1.33% | github.x2ecom/ddevault/go-libvterm.ScreenCell.Attrs )
* config: proper error handle [filters] configwagner riffel2021-04-121-1/+4
| | | | | | Instead of panic when compiling a regular expression, return it up Signed-off-by: wagner riffel <w@104d.net>
* fix typo in quoted reply templateEric Bower2021-03-072-2/+2
|
* templates: fixup error in template modificationReto Brunner2021-03-072-2/+2
| | | | | The change of WrapText --> Wrap left the order of the arguments unchanged, which is wrong.
* templates: Use wrap instead of wrapTextNícolas F. R. A. Prado2021-03-072-2/+2
| | | | | | | bf0f72a533d5 ("template: add exec and wrap") introduced wrap which allowed to chain wrapText. It also changed the aerc-templates man page to document wrap instead of wrapText. The templates weren't updated then, so update now.
* add mimeType to OriginalMail struct for both forward and replyReto Brunner2021-03-073-12/+23
|
* FindFirstNonMultipart: return the proper pathReto Brunner2021-03-071-1/+1
| | | | There was a bug that lead to the wrong path being returned by the function.
* send: fix missing error returnReto Brunner2021-02-281-0/+4
|
* Fix linter warningsReto Brunner2021-02-264-9/+8
| | | | | | * Remove redundant return (code was never reached) * Remove redundant type information * Rename unused function parameters to "_"
* lib/parse: simplify parseAddressListReto Brunner2021-02-221-13/+5
|
* aerc: try to recover from a panicReto Brunner2021-02-111-0/+19
| | | | | | As of now we crash fairly often. The problem is that we didn't run the cleanup routine of the ui in this case, leaving the pty in a bad state. Instead, recover from a panic and at least try to run the ui deinit.
* maildir: don't read the full file into memoryReto Brunner2021-02-081-8/+2
|
* notmuch: don't read the full file into memoryReto Brunner2021-02-081-9/+3
|
* Makefile: use git version string if we canReto Brunner2021-02-071-0/+6
| | | | | | | Some packagers overwrote the version we embed in aerc, we really don't want that. Hence we force clear the variable at the beginning of the makefile. If git is available and returns a useful info we now use that version instead of the hardcoded version
* terminal: Add support for Shift+TabAlexey Yerin2021-02-071-0/+1
|
* send: fix crash if invalid password is givenReto Brunner2021-02-051-1/+2
|
* Get rid of the aerc.PushError(" " + $string) idiomReto Brunner2021-01-3018-29/+29
| | | | The individual callers should not be responsible for padding
* Refactor lib/open to accept user provided argumentsReto Brunner2021-01-305-45/+70
| | | | | | | | | | | | * Get rid of open_darwin It just lead to code duplication for a simple one string change. Instead we query it during initialization * Accept user provided arguments "open" on MacOS accepts things like -A to use a specific application Pass trough arguments the user provided in order to facilitate this * Refactor the function to a struct This makes it more convenient for the caller and avoids signatures like lib.OpenFile(nil, u.String(), nil) which are fairly unreadable
* send: don't block the UI thread during the sendingReto Brunner2021-01-241-35/+34
|
* save: if part name is a path, only use the filenameRobin Opletal2021-01-141-1/+9
|
* correct permission check on accounts.confBor Grošelj Simić2021-01-141-2/+1
|
* compose: apply default style to header separatorEyal Sawady2021-01-141-3/+3
|
* trim <> from messageIDs when handling mailto linksReto Brunner2021-01-121-0/+6
| | | | Co-authored-by: James Walmsley <james@fullfat-fs.co.uk>
* Apply dirlist style to unselected directoriesEyal Sawady2021-01-121-1/+1
|
* Reapply 'Fix nil pointer deref on Envelope'Shaw Vrana2021-01-031-3/+6
| | | | | | The commit bf16ccde484ce3b6d2a4b843e7ebc04a9b2a957d appears to have been unintentionally dropped by commit 905cb9dfd3ef197bb4b59039a1be76ce2c8e3099 (Implement style configuration).
* Freshen up readme with binary packagesy0ast2020-12-271-13/+34
|
* s/RFC 8022/RFC 2822/Bor Grošelj Simić2020-12-261-1/+1
|
* Make makefile compatible with 3.81 (default MacOS)y0ast2020-12-241-1/+1
| | | | Enables using the makefile with mac default make.
* add italics supporty0ast2020-12-241-0/+3
| | | | | | Fixes: https://todo.sr.ht/~sircmpwn/aerc2/416 Co-authored-by: JD <john1doe@ya.ru>
* update tcell to v2 and enable TrueColor supporty0ast2020-12-1831-41/+36
| | | | | | | | | Also update to the tcell v2 PaletteColor api, which should keep the chosen theme of the user intact. Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop clipping the value to one of the theme colors. Generally this is desired behaviour though.
* Use extensions for querying the mime type of attachmentsReto Brunner2020-12-151-8/+16
| | | | | This gets rid of the issue that lots of things are detected as zip files, even though they are a more specialized format (say office files)
* fix aerc-stylesets(7) typosReto Brunner2020-12-132-3/+3
|
* notmuch: trim excluded tagsKalyan Sriram2020-12-021-0/+3
| | | | | Trims whitespace in list of excluded notmuch tags. This allows a comma separated list with spaces to be correctly processed.
* notmuch: remove gc close hooksReto Brunner2020-12-023-2/+5
| | | | | | | We frequently had issues with notmuch segfaulting and my guess is that this was due to the garbage collection magic used in the module. This changes to a fork that ripped the functionality out.
* fix mailto parsingReto Brunner2020-11-281-1/+5
|
* Refactor send commandReto Brunner2020-11-211-201/+304
|
* reply: add References headerReto Brunner2020-11-141-1/+28
|
* imap: strip <> from message-idsReto Brunner2020-11-141-1/+9
|
* lib/parse: use go-message msgid parsing if it succeedsReto Brunner2020-11-141-2/+6
|
* allow the loading of existing headersReto Brunner2020-11-141-2/+4
|
* format: remove parse methods, use the one from go-messageReto Brunner2020-11-143-38/+9
|
* compose: use a proper header instead of a string mapReto Brunner2020-11-1414-217/+318
| | | | | | | | | | | | | Prior to this commit, the composer was based on a map[string]string. While this approach was very versatile, it lead to a constant encoding / decoding of addresses and other headers. This commit switches to a different model, where the composer is based on a header. Commands which want to interact with it can simply set some defaults they would like to have. Users can overwrite them however they like. In order to get access to the functions generating / getting the msgid go-message was upgraded.
* models: add RFC822 headers to OriginalMailReto Brunner2020-11-143-16/+15
|
* rename header to heditorsReto Brunner2020-11-141-6/+6
|
* templates: Remove ParseTemplate as it's unusedReto Brunner2020-11-141-14/+0
|
* remove models.Address in favor of go-message AddressReto Brunner2020-11-146-57/+58
| | | | | | | We made a new type out of go-message/mail.Address without any real reason. This suddenly made it necessary to convert from one to the other without actually having any benefit whatsoever. This commit gets rid of the additional type
* version bump: 0.5.2 0.5.2Reto Brunner2020-11-141-1/+1
|
* makefile: add debug targetReto Brunner2020-11-131-1/+5
|
* Check account's from value is not emptyAndrew Jeffery2020-11-131-0/+3
| | | | | This leads to a nasty 'mail: no address' message for each email if left empty so the user really should enter it.
* templates: better error messageReto Brunner2020-11-111-2/+3
|