Code Monkey home page Code Monkey logo

Comments (9)

DenBond7 avatar DenBond7 commented on July 24, 2024

It's a very interesting assignment. And it's not easy :)

Displaying messages: loading a message takes way too long. I suspect we are creating a new connection for each screen?

Yes, for now for the prototype we are creating a new connection for each screen.

This task will take a long time, and I will have to investigate some moments.

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

Yes I understand that. It makes sense, I would do the same for a prototype. But the responsiveness/usefulness of the app would really suffer if we left it this way, I think.

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

Yes, we need to make improvements that you described. Then the application will be much more comfortable.

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

@DenBond7 somehow it was failing during build. Maybe some of your updates to Folder class did not get committed? The commit above is just temporary so that I can work with the project.

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

Maybe some of your updates to Folder class did not get committed?

@tomholub Yes, that's right. I missed one file for the commit.

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

For me

Admittedly the thread safety rules for JavaMail are not well documented, but hopefully they mostly match what you would expect.

Multiple threads can use a Session.

Since a Transport represents a connection to a mail server, and only a single thread can use the connection at a time, a Transport will synchronize access from multiple threads to maintain thread safety, but you'll really only want to use it from a single thread.

Similarly, a Store can be used by multiple threads, but access to the underlying connection will be synchronized and single threaded.

A Message should only be modified by a single thread at a time, but multiple threads should be able to read a message safely (although it's not clear why you would want to do that).

https://stackoverflow.com/questions/12732584/threadsafety-in-javamail

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

I like the progress here! Let me know when it's ready to test, I'm looking forward to try it.

from flowcrypt-android.

DenBond7 avatar DenBond7 commented on July 24, 2024

Finally, I made the stable version for testing. Now you can start testing.

After the work done, I would like to add some comments:

  1. At the moment, the key object in synchronization is the EmailSyncService. Thanks to him, we use a single connection for all requests.

  2. I compared how different mail clients work. For the study, I took Gmail and BlueMail. For more logical work, I think we need to improve the way we send messages and moving them to other folders. For example, we'd better mark messages as deleted and delete them in the background, like in Gmail. (Similarly sending, replying and archiving)

  3. Thanks to the first, I prepared the ground for the implementation of correct synchronization. The current implementation does not take into account many moments

  • We equally use all types of connections - WIFI, 3G and others. This can be bad for the device's autonomy.
  • The automatic loading of new messages has not yet been implemented. You can only download them manually.
  • Also we do not track the battery level. This is also not very good.

from flowcrypt-android.

tomholub avatar tomholub commented on July 24, 2024

Perfect, I like that you prepared it for auto sync. That will be great in the future. I'm closing this for now unless there are things that you want to add now.

from flowcrypt-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.