Gajim - 2019-09-02


  1. mrdoctorwho hi there
  2. mrdoctorwho I have two really annoying problems with Gajim
  3. mrdoctorwho First — there is no join groupchat in context menu anymore
  4. mrdoctorwho Second — I have a roster with 420 contacts, 257 of them are online (local xmpp server at work), Gajim reconnects to this server in a loop (probably because it takes too long to load the roster)
  5. mrdoctorwho And recent gajim versions are really slow and CPU hungry
  6. tom which gajim version is not slow and cpu hungry?
  7. wurstsalat mrdoctorwho: have you tried current master? There were some performance fixes for the problems you describe.
  8. mrdoctorwho This is the current master
  9. wurstsalat Which context menu do you refer to?
  10. mrdoctorwho right click on the account row
  11. wurstsalat Yes, use Start chat for joining
  12. wurstsalat Regarding your reconnection problem: logs would be helpful
  13. mrdoctorwho That's not really a good idea to use Start chat, because it requires a chat to be bookmarked
  14. mrdoctorwho I actually can't find bookmarks manager too
  15. wurstsalat It's in accounts > advanced
  16. mrdoctorwho Thanks
  17. mrdoctorwho wurstsalat, I can do logs, but what flags I should use for logs?
  18. wurstsalat Join group chat showed recently used group chats, that's right. Don't know about the situation in Start chat
  19. wurstsalat gajim -v should be enough while capturing one reconnection loop
  20. mrdoctorwho Yeah, but that's a lot
  21. wurstsalat There are more specofoc options but I'm not sure which one would be best for this
  22. tom Does gajim support jack audio?
  23. Eduard If the system support that why not?
  24. tom I was asking if it already does
  25. tom I've got Jack running and it doens't seem to detect
  26. tom was Jack support only obtained in a recent version?
  27. tom (not talking about jingle, just system notifications)
  28. Link Mauve tom, those are using the command of your choice, have a look in the configuration.
  29. Link Mauve By default aplay IIRC.
  30. Link Mauve Which obviously uses libasound, and thus most of the time ALSA.
  31. tom libasound, I wasn't aware that's an actual python library, I thought it was using an external player like mplayer
  32. tom thanks
  33. Link Mauve tom, aplay is a binary, libasound is the library it and most software use to output sound on Linux.
  34. tom oh
  35. tom wait
  36. tom so all it's doing is calling the aplay binary with a paramter
  37. tom well that's a super simple dix
  38. Link Mauve Yes, just change the binary in the configuration.
  39. Link Mauve Yes, just change the command in the configuration.
  40. Link Mauve As I said in my first message.
  41. tom test
  42. tom great
  43. tom switching it from aplay -q to mplayer -quiet works
  44. tom might I suggest using mplayer by default, since mplayer works with every audio subsystem and can auto-detect and failover to the correct subsystem instead of aplay which is alsa only
  45. Link Mauve tom, no, mplayer is huge and barely maintainer, while aplay is available on every Linux system.
  46. Link Mauve tom, no, mplayer is huge and barely maintained, while aplay is available on every Linux system.
  47. Link Mauve You may want to configure libasound to output to JACK instead.
  48. tom Why do you think mplayer is barely maintained?
  49. Link Mauve It was the last time I had a look.
  50. tom News 2019-04-18, Thursday :: MPlayer 1.4 released
  51. Link Mauve tom, IIRC it’s very much in maintainance mode, and their codebase is awfully legacy.
  52. Link Mauve Try mpv when you feel like it.
  53. tom yeah, I've got MPV
  54. Link Mauve It recently lost its lead dev, but it’s still moving forward.
  55. tom there's a program I use that's similar
  56. tom gmusicbrowser
  57. tom similar in structure to that way gajim handles audio. strange thing is mplayer plays all my audio files fine while a few albums don't work in mpv backend
  58. tom I guess for this scenario it doesn't matter but I would think MPV would be heavier than mplayer
  59. tom or since mpv uses ffmpeg, just ffplay
  60. Link Mauve mplayer did fork ffmpeg long ago internally, they only semi-recently started building against ffmpeg, so you may want to provide those samples to ffmpeg so that they can fix that.
  61. Link Mauve tom, why would it be heavier?
  62. Link Mauve They mostly removed legacy code back when it got forked, and then added features back the proper way.
  63. tom I guess for Gajim MPV works just as well
  64. tom maybe I just got a bad build but I'll report next time I get an audio file that files with mpv/ffmpeg
  65. bot Daniel Brötzmann modified an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9818 >: #9818: < toogled enable archive messages >
  66. bot Daniel Brötzmann modified an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9819 >: #9819: < Crash when receiving a message from Cisco Jabber >
  67. bot Daniel Brötzmann modified an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9692 >: #9692: < Jingle fallback socks5 to IBB does not work correctly >
  68. lovetox_ mrdoctorwho StartChat dialog has all MUCs you joined recently
  69. mrdoctorwho lovetox_, how about joining a new muc?
  70. lovetox_ you type the jid into the startchat dialog, or you use the global search also in start chat
  71. mrdoctorwho I don't find it obvious
  72. mrdoctorwho Can we have the old join chat dialog back?
  73. lovetox_ nope
  74. lovetox_ its called literally "Start a Chat" what isnt obvious about it
  75. mrdoctorwho But this is really not a good idea to throw it away. Even Conversations has it
  76. lovetox_ what should this dialog have? a single field for the jid?
  77. mrdoctorwho This is the least it might have
  78. lovetox_ you have also to remember, joining a groupchat per jid, is something you almost never do
  79. lovetox_ either you get invited or you click a link or you use the global search
  80. mrdoctorwho This is something I do everytime for chats I haven't bookmarked
  81. lovetox_ mrdoctorwho in master every groupchat is bookmarked
  82. lovetox_ you cant "not bookmark" a groupchat
  83. lovetox_ bookmarks is a behind the scene implementation detail of how a client stores its recent chats
  84. lovetox_ nothing you need to manage anymore in the future
  85. mrdoctorwho I can lose bookmarks
  86. mrdoctorwho I can register a new account and try to join somewhere
  87. lovetox_ yeah and so you click Start a Chat, and paste the jid
  88. lovetox_ thats really easy !
  89. mrdoctorwho It doesn't say I can join a groupchat. For me "Start a chat" means start a 1-to-1 chat
  90. lovetox_ there are some concept changes here, i get that, but try to use it and report if you really have problem other than "im used to it"
  91. lovetox_ so if i change the menu entry to "Start a Chat / Join a Group chat"
  92. lovetox_ then its fine?
  93. mrdoctorwho I'm not really saying I'm used to the old method, I'm saying that the new method isn't really obvious
  94. lovetox_ Im not sure its useful to keep that separation 1-1 Chat, Groupchat. How is this useful? Its just a Chat with more persons
  95. mrdoctorwho lovetox_, I'm not sure that's enough. If you rework this new window so it would be more obvious that I can join a groupchat there
  96. lovetox_ but what is not obivous about a adress field
  97. mrdoctorwho It doesn't say what I can do with it
  98. lovetox_ maybe it needs some labels and help texts
  99. mrdoctorwho Yes
  100. mrdoctorwho I'm an experienced user but when I see this window I don't understand how it works
  101. mrdoctorwho I expected it to work like search in the list of suggested chats
  102. lovetox_ ok i hear you, yeah i agree it could do a better job at describing what the dialog is capable of
  103. mrdoctorwho thank you
  104. mrdoctorwho unfortunately I don't see how this dialog could be enhanced
  105. mrdoctorwho actually a search icon makes it look like a search field, not an URL field
  106. mrdoctorwho actually the search icon makes it look like a search field, not an URL field
  107. mrdoctorwho lovetox_, by the way, could you point me at the debug flags I need to set to debug Gajim overloading CPU during roster loading in recent master?
  108. mrdoctorwho and connection loss during loading
  109. lovetox_ start with -v
  110. lovetox_ at least the connection loss should be documented there
  111. lovetox_ are you saying you have these problems only recently with the large roster?
  112. mrdoctorwho lovetox_, I had them some time, then they disappeared and now I have them again. What should I look for in the log? It's pretty big
  113. lovetox_ for something with (E)
  114. lovetox_ or tracebacks
  115. lovetox_ and is the cpu consumption less if the roster is hidden?
  116. mrdoctorwho no
  117. lovetox_ i guess you could make a cprofile to see whats causing the cpu load
  118. lovetox_ python3 -m cProfile -s cumtime ./launch.py
  119. mrdoctorwho Had a connection loss during connection on a smaller roster
  120. mrdoctorwho Unfortunately I disabled logging for this
  121. mrdoctorwho lovetox_, https://conference.gajim.org:5281/pastebin/d64c3698-0354-464e-b75b-afcdef86a5af
  122. mrdoctorwho <presence type='error' to='mrdoctorwho@helldev.net/Work' from='mrdoctorwho@gmail.com'><error by='helldev.net' type='cancel'><remote-server-not-found x https://conference.gajim.org:5281/pastebin/1c5faa9f-4078-404e-86b8-350139c871f6
  123. mrdoctorwho and a traceback (not related though)
  124. lovetox_ hm not clear from the error why the socket was disconnected
  125. lovetox_ maybe in the serverlogs there is the reason?
  126. mrdoctorwho I have no access to the jabber.loc server logs unfortunately
  127. lovetox_ but this is not some cisco server?
  128. mrdoctorwho it's ejabberd
  129. mrdoctorwho I can email you with the whole log if you want
  130. mrdoctorwho or just send a link into private
  131. lovetox_ am, yeah mail it to philipp@hoerist.com
  132. lovetox_ but i have only time in the evening to look at it
  133. mrdoctorwho there's no rush, take your time
  134. lovetox_ please try to get the cprofile also, so we can see where the cpu problems are
  135. mrdoctorwho yeah, it will be there at the end
  136. James hello, is there documentation for the plugin api? thanks
  137. lovetox_ no, you have to live with the examples in the plugin repo
  138. bot TSRh created an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9821 >: #9821: < Need a 'Send' button in chat window >
  139. bot TSRh modified an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9821 >: #9821: < Need a 'Send' button in chat window >
  140. bot Daniel Brötzmann modified an issue in _gajim_ < https://dev.gajim.org/gajim/gajim/issues/9821 >: #9821: < Need a 'Send' button in chat window >
  141. bot Daniel Brötzmann proposed a new merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/506 >: DialogButton: Add Accept button type
  142. bot Daniel Brötzmann updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/451 >: WIP: Rework input dialogs
  143. bot Daniel Brötzmann updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/402 >: Rework contact info
  144. bot Daniel Brötzmann updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/483 >: WIP: New Profile Window
  145. lovetox mrdoctorwho, did you anything special before generating this log?
  146. lovetox for example delete your cache or anything other gajim related, like deleting the account or something?
  147. lovetox the server does not seem to support roster versioning
  148. lovetox which is pretty bad considering you have 400 contacts
  149. lovetox this means all contacts have to be requested from the server on every client start
  150. lovetox i think the server ends the connection for some reason he doesnt tell us
  151. lovetox and yes cpu load comes from roster, seems just too many online contacts for gajim to handle
  152. lovetox there is definitly much potential for improvement in this area for Gajim
  153. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < https://dev.gajim.org/gajim/gajim >: *ee7ad12f* < https://dev.gajim.org/gajim/gajim/commit/ee7ad12f073b6a56406823ecb716092590f2da39 > DialogButton: Add Accept button type
  154. bot Philipp Hörist merged a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/506 >: DialogButton: Add Accept button type
  155. rom1dep lovetox: this css caching thing really makes a seizable difference, thanks :)
  156. andrey.g I'm curious where the CPU usage comes from. Are there every seconds dozens of status changes for those 400 contacts, so that Gajim must all the time do many redraws (even if only few are really visible?). Or Gajim would update even status "changes" "available -> available"?
  157. lovetox yes andrey.g, status changes, and on every status change items have to be sorted again
  158. lovetox but im sure Gajim could do this more efficiently
  159. lovetox but its alot of traffic, log mrdoctorwho sent me was 60.000 log lines in 2 minutes
  160. lovetox in the 3 minutes of the log, the rosters compare method for sorting was called 163.250 times
  161. lovetox for roster of 420
  162. andrey.g That's a lot. Maybe once status change has been received instead of processing it immediately just call GLib.timeout_add_seconds(5?) with a callback (and before remove GLib.timeout if there is already one). Then in the callback perform all things.
  163. lovetox why andrey.g this would only help if a contact changes his status multiple times within X seconds
  164. lovetox i dont think this is the case
  165. asterix so we show status changes only 5 seconds after we get it?
  166. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < https://dev.gajim.org/gajim/gajim >: *1044d1c7* < https://dev.gajim.org/gajim/gajim/commit/1044d1c7ba143c4d3916f48e025e7b0bd7c0ab51 > Improve default avatar caching Caches now also the circle clipping
  167. andrey.g I've supposed that if there are few thousands events within only 3 minutes, the solution would be throttling. But yes, we would need some delay. I'm not sure whether 5 seconds would be too long or not.
  168. lovetox you assume code is perfect and efficient
  169. lovetox only then would throtteling be the last solution
  170. andrey.g anyway human is unable to notice so many events, so there is no need to process them fully. Perhaps one could try first with a slightly throttling, e.g. 500 ms.
  171. lovetox about what are you talking?
  172. lovetox what event is not noticeable?
  173. lovetox a status change? of course we want the last status
  174. andrey.g > 3 minutes ... sorting was called 163.250 times
  175. lovetox andrey.g, no thats not what i said
  176. lovetox i said the compare func used in sorting was called
  177. andrey.g aha, yes
  178. lovetox if you have a roster of 100 and you want to sort it, Gtk calls compare on all elements probably
  179. lovetox not sure how efficient and what sorting method it uses
  180. andrey.g actually it is interesting, how many times the sorting function is called per minute or second
  181. lovetox but i dont think this is the problem, it just illustrated how much is done
  182. andrey.g with latest gajim, indeed, there is no more very good visible lag during scrolling with even tiny roster without avatars at all (same for groupchat member list)
  183. lovetox are you saying there is lag or there is no lag
  184. andrey.g no lag anymore I was curious about, since my roster is tiny
  185. andrey.g godd done!
  186. andrey.g good done!