matzman666 / PyPipboyApp

A platform independent and extensible unofficial Fallout 4 Pipboy Companion App
GNU General Public License v3.0
85 stars 20 forks source link

App Slowdown - Unknown Messages Being Sent #50

Open killeand opened 8 years ago

killeand commented 8 years ago

Hey all,

I noticed some problems lately with the app freezing every few seconds, but after I posted this, I zoomed in on my map and suddenly the freezing was going away. So just an FYI, the app can only handle rendering so many icons on the map view before things start going haywire.

Next, I've been noticing some strange messages being sent from the app. Here is the log:

F1 2016-02-05 00:25:27,100 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:27,100 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:28,100 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:28,100 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:29,099 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:29,100 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:30,102 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:30,102 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:31,099 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:31,099 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:32,140 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:32,140 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:33,260 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:33,260 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:34,100 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:34,100 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:35,161 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:35,161 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:36,181 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:36,181 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:37,101 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:37,101 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:38,102 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:38,102 DEBUG Sending message: b'\x00\x00\x00\x00\x00' F1 2016-02-05 00:25:39,100 DEBUG Received message with type 0 and size 0. F1 2016-02-05 00:25:39,100 DEBUG Sending message: b'\x00\x00\x00\x00\x00'

Normally all I would see is this:

F1 2016-02-05 00:19:46,559 DEBUG Received message with type 3 and size 27. F1 2016-02-05 00:19:46,559 DEBUG Received message with type 3 and size 27. F1 2016-02-05 00:19:46,568 DEBUG Dispatching message with type 3 and size 9 F1 2016-02-05 00:19:46,576 DEBUG Dispatching message with type 3 and size 9 F1 2016-02-05 00:19:46,579 DEBUG Received message with type 3 and size 9. F1 2016-02-05 00:19:46,608 DEBUG Dispatching message with type 3 and size 9

And so on. I understand the latter is likely the map position being updated. But the above... I haven't the foggiest (are you sending a heartbeat?).

Thoughts?

matzman666 commented 8 years ago

Yes, these messages are heartbeats. When Fallout 4 does not receive heartbeats from the app, it will close the connection. Prior to v0.8.1 I did not write them into the log, but since people had connection problems I decided to write them into the log to determine what caused the disconnects people were experiencing.

As it turned out the reason for the disconnects where performance problems because the map markers were updated too often. I fixed that, and map markers should now only be updated when really needed. Performance is now much better, but still they need quite some performance. Currently I am busy fixing other bugs, but when that is finished I will re-visit the map markers and see if I can further improve performance. Btw, I also experienced slight performance problems when zooming in too much into the Satellite View map.