summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/messages.py
AgeCommit message (Collapse)Author
2014-09-03remove uid from signatureKali Kaneko
2014-08-21Fixed some PEP8 warnings on the messages fileBruno Wagner Goncalves
2014-08-21MessageCollection iterators must instantiate LeapMessage with the collectionBruno Wagner Goncalves
2014-02-20Fix regression on "duplicate drafts" issue.Kali Kaneko
Not a permanent solution, but it looks for fdoc matching a given msgid to avoid duplication of drafts in thunderbird folders.
2014-02-20mail parsing performance improvementsKali Kaneko
Although the do_parse function is deferred to threads, we were actually waiting till its return to fire the callback of the deferred, and hence the "append ok" was being delayed. During massive appends, this was a tight loop contributing as much as 35 msec, of a total of 100 msec average. Several ineficiencies are addressed here: * use pycryptopp hash functions. * avoiding function calling overhead. * avoid duplicate call to message.as_string * make use of the string size caching capabilities. * avoiding the mail Parser initialization/method call completely, in favor of the module helper to get the object from string. Overall, these changes cut parsing to 50% of the initial timing by my measurements with line_profiler, YMMV.
2014-02-20catch empty rdocKali Kaneko
2014-02-20fix rdoc duplicationKali Kaneko
2014-02-17avoid unneeded db index updates and rdoc creationKali Kaneko
2014-02-17remove early notification on append for nowKali Kaneko
this can be done to save some msec, but additional measures have to be taken to avoid inconsistencies with reads right after this is done. we could make those wait until a second deferred is done, for example.
2014-02-17docstring fixesKali Kaneko
2014-02-17remove all refs during removal, and protect from empty docsKali Kaneko
2014-02-17defer appends tooKali Kaneko
and cut some more time by firing the callback as soon as we've got an UID.
2014-02-17defer fetch to threadKali Kaneko
also, dispatch query for all headers to its own method.
2014-02-17fix several bugs in copy/storeKali Kaneko
2014-02-17fine grained locks for putsKali Kaneko
2014-02-17separate better dirty/new flags; add cdocsKali Kaneko
2014-02-17remove hdoc copy since it's in its own structure nowKali Kaneko
2014-02-17make fdoc, hdoc, chash 'public' propertiesKali Kaneko
2014-02-17change internal storage and keying scheme in memstoreKali Kaneko
2014-02-17long-due update to unittests!Kali Kaneko
So we're safe under the green lights before further rewriting. :)
2014-02-17take recent count from memstoreKali Kaneko
2014-02-17prefetch flag docsKali Kaneko
2014-02-17defer parse to threadKali Kaneko
2014-02-04fixes after reviewKali Kaneko
* Some more docstring completion/fixes. * Removed unneeded str coertion. * Handle mailbox name in logs. * Separate manhole boilerplate into its own file.
2014-02-02fix missing content after in-memory addKali Kaneko
because THE KEYS WILL BE STRINGS AFTER ADDED TO SOLEDAD Can I remember that? * Fix copy from local folders * Fix copy when we already have a copy of the message in the inbox, marked as deleted. * Fix also bad deferred.succeed in add_msg when it already exist.
2014-01-31Restore expected TypeError.Kali Kaneko
I must have removed this to get rid of a error with some test sample during the testing of the branch, but it's absolutely needed so that mime attachments get shown properly. If the TypeError raises inapropiately due to some malformed part_map, then we will have to catch it using a workaround somewhere else.
2014-01-31remove wrong unicode conversionKali Kaneko
2014-01-31properly implement deferreds in several commandsKali Kaneko
Passing along a deferred as an observer whose callback will be called with the proper result. Returning to thread in the appropiate points. just let's remember that twisted APIs are not thread safe! SoledadStore process_item also properly returned to thread. Changed @deferred to @deferred_to_thread so it results less confusing to read. "know the territory". aha!
2014-01-31prime-uidsKali Kaneko
We pre-fetch the uids from soledad on mailbox initialization
2014-01-30fix badly terminated headersKali Kaneko
2014-01-30Fix indexing error that was rendering attachments unusableKali Kaneko
Also, check for empty body-doc
2014-01-30Fix copy and deletion problemsKali Kaneko
* reorganize and simplify STORE command processing * add the notification after the processing of the whole sequence
2014-01-30docstring fixesKali Kaneko
Also some fixes for None comparisons.
2014-01-28fix find_charset rebaseKali Kaneko
2014-01-28handle last_uid property in memory storeKali Kaneko
2014-01-28recent-flags use the memory storeKali Kaneko
2014-01-28flags use the memstoreKali Kaneko
* add new/dirty deferred dict to notify when written to disk * fix eventual duplication after copy * fix flag flickering on first retrieval.
2014-01-28Unset new flag after successful writeKali Kaneko
2014-01-28debug infoKali Kaneko
2014-01-28add soledadstore classKali Kaneko
move parts-related bits to messageparts pass soledad in initialization for memory messages
2014-01-28split messagepartsKali Kaneko
2014-01-28memory store for append/fetch/copyKali Kaneko
2014-01-27Use repr() on exceptions, inform if using 'replace'.Ivan Alejandro
2014-01-22Handle non-ascii headers. Closes #5021.Ivan Alejandro
2014-01-22Add find_charset helper and use where is needed.Ivan Alejandro
2014-01-21workaround for recursionlimit due to qtreactorKali Kaneko
2014-01-20make the read/write operations over sets atomicKali Kaneko
Fixes: #5009
2014-01-17Merge remote-tracking branch ↵Tomás Touceda
'refs/remotes/ivan/bug/handle-unicode-characters' into develop
2014-01-17Fix encodings usage, use custom json.loads method.Ivan Alejandro
Also remove some unused imports.
2014-01-17Add a fetch_headers for mass-header fetch queriesKali Kaneko