madagaga / WTalk

GTalk like client
MIT License
20 stars 10 forks source link

New received/sent messages are delayed #1

Closed thecodrr closed 8 years ago

thecodrr commented 8 years ago

I don't know why this happens but there is a certain delay whenever a new message is sent or received. I think, the message history is not constantly refreshed and is dependent upon the Message_Recieved event. Which is raised with a delay, and sometimes not raised at all, due to which message is not received.

madagaga commented 8 years ago

Thanks for your issue, which version did you use, source or release ?

thecodrr commented 8 years ago

I am sure it was release version. Last time I tried building from the source, it built but it always got stuck on the loading screen, you know after the authentication process. I will try building again, let's see if this works! Great work, man btw.

thecodrr commented 8 years ago

Yeah, the source version worked but still the same issue. The message is sent, I am sure of that, but it isn't being displayed on the Message History unless I go to Google Hangouts and read the message from there. After the message is read, it appears in the message history. Even though I sent it myself and there is no concept of "read" or "unread". And for the messages that are being received, it is the same issue with them. They appear after they are considered as "read", which I have to do from Hangouts myself.

Hope I was comprehensible and you understand me :+1:

madagaga commented 8 years ago

Ok, I will give a look. During my test I was connected with hangout, I did not try without being connected.

thecodrr commented 8 years ago

The messages should be displayed in the message history even when a user is not connected to Hangouts, otherwise there is no point in using a third-party client.

Is there no manually set timer/time-period after which the message history is updated again? I can imagine the affect this will have on performance because it will call the API regularly after very short intervals but with proper garbage collection and disposals, I think it will be better than Event Invoke. What do you say?

Have you used Hangups? What is the situation there?

madagaga commented 8 years ago

The main process is similar to hangups, long poll request every time in background. You are right, if it does not work alone (without being connected on hangout) there is no interest.

I did not use hangups, because I'm on windows and i did not find a way to get it work, but i will try again.

Actually there is many difference with hangups, as it has more contributor and more functionality.

For example hangups used protojson and now protobuf, wtalk use protojson. Protobuf has less latency, same for long poll request, hangups use stream i dont.

I have to improve some parts to be up to date vs hangups.

Thanks for your comments, it helps (I thought i was the unique user/tester)

thecodrr commented 8 years ago

I tried Hangups on Linux and it is pretty robust. And you are right, it has more functionality and more contributors. Your efforts are appreciated by the community. Porting a lib is really a hard task. I will be along the project to help you out in anyway I can. Thank you for such a great effort.

madagaga commented 8 years ago

Thanks I appreciate ! I'll find some time to work on it.

madagaga commented 8 years ago

I've just committed some add/edit. It should correct this issue.

And there is a new, but i did not find how to solve id : you have to double click on the textbox to write new message.

Can you confirm please ?

thecodrr commented 8 years ago

Ok...On it. Sorry for the delayed reply.

thecodrr commented 8 years ago

Yup! Works like a charm now. :+1:

There is that other bug though, double-click to focus. I tracked it for you. I think the problem is in setfocus() method. Whenever the new message text box is clicked, this method is called. Now, I don't know what is the problem with it, it should work. I will debug a bit more and tell you if anything new happens.

madagaga commented 8 years ago

Thanks !!