Gajim - 2023-10-02


  1. Kris

    hmm, I might be wrong, but I don't think that is a feature in XMPP? I also find that somewhat privacy invasive.

  2. Polixgen

    > hmm, I might be wrong, but I don't think that is a feature in XMPP? I also find that somewhat privacy invasive. it has on cheogram (conversations fork)

  3. opal

    more privacy-invasive than presence in general?

  4. opal

    not by much, i'd think

  5. opal

    still it's of arguable usefulness

  6. nicoco

    Polixgen: it is standardized (Kris: XEP-0319, it's even "stable", wow) and implemented. Go to your contact list, it's in the tooltip over contacts. Ofc, your contact must use a client that supports this feature, and they must have it enabled. I think it should be more easily, my WIP attempts: https://dev.gajim.org/gajim/gajim/-/merge_requests/977 and https://dev.gajim.org/gajim/gajim/-/merge_requests/976 ;)

  7. Schimon

    XML Console shows this: ``` <presence xmlns="jabber:client" id="" xml:lang="en" from="slixfeed@" to=""> <show>chat</show> <status>News items: 9497</status> <x xmlns="vcard-temp:x:update"> <photo /> </x> </presence> ``` But Gajim doesn't show the status message: "News items: 9497".

  8. andrath

    tmux

  9. andrath

    sorry, wrong window

  10. Schimon

    https://xmpp.pimux.de/file_share/473f9046-ca4b-4daf-a990-ba52279f70bb/gajim_status_slixfeed.png

  11. Lightning Bjornsson (they, he, xe/hir)

    (Raleigh?)

  12. Schimon

    ClassicOS98 Theme

  13. Schimon

    Lightning Bjornsson, https://github.com/ClassicOS-Themes/ClassicOS-2000-Theme

  14. umu

    real

  15. Schimon

    Gentlemen, I need help with the status message please.

  16. Lightning Bjornsson (they, he, xe/hir)

    Only the blokes? S••t. Otherwise I'd ask what you mean and try to figure out how to get to the bottom of it.

  17. umu

    classic ellenor

  18. umu

    your cert is expired rn

  19. Schimon

    lovetox, it appears that status messages are shown only in MUC list/roster.

  20. Lightning Bjornsson (they, he, xe/hir)

    > umu a écrit : > classic ellenor I know someone by that name!

  21. Lightning Bjornsson (they, he, xe/hir)

    > umu a écrit : > your cert is expired rn you should be expired rn

  22. agh

    I am not expiring fast enuf.

  23. umu

    🙄

  24. Kevino

    I am having trouble with multi-device syncing

  25. Kevino

    Messages read on one device doesn't show as read on gajim. What must be the problem ?

  26. nicoco

    Kevino: in public rooms that's expected as XMPP currently lacks a standard for read status in public rooms.

  27. Kevino

    no i guess its also happening in private chats

  28. nicoco

    Private groups or 1:1 chats?

  29. Kevino

    1:1

  30. nicoco

    Are the contacts offline or online?

  31. Kevino

    let me check again

  32. nicoco

    Because it's expected for offline contacts. Does your server support carbons and MAM (if not, change server, it's needed for a pleasant multi device experience…)

  33. nicoco

    Because it's expected for offline contacts. Does your server support carbons and MAM? (if not, change server, it's needed for a pleasant multi device experience…)

  34. Kevino

    i checked with my own accounts all online , but on gajim it stays unread

  35. Kevino

    yes both support message carbons and mam

  36. nicoco

    What other app do you use? Are you sure it sends "read markers"?

  37. Kevino

    ohh 😅️

  38. Kevino

    i think i turned off message read status for contacts

  39. Kevino

    that might be the problem ?

  40. nicoco

    Yeah this is a limitation of XMPP right now. Read state relies on sending read markers to contact (or groups), which is not ideal at all.

  41. Kevino

    ok thanks

  42. nicoco

    A draft spec for improving this was started a while ago: https://xmpp.org/extensions/inbox/inbox.html - but it's only a draft for now

  43. nicoco

    And I know that gajim's maintainer does not like the current situation of read status relying on sending read markers to the recipient, so gajim will probably implement something better some day ;-)

  44. Kris

    > Yeah this is a limitation of XMPP right now. Read state relies on sending read markers to contact (or groups), which is not ideal at all. TIL, yeah that isn't ideal.

  45. nicoco

    Kris: tigase folks have come up with a hack relying on "self MUC-mediated read markers" for public rooms, but it's not standardized and relies on MUCs enabling PMs. (and it only works in the tigase ecosystem)

  46. Kris

    Yeah, these hacks are not ideal either

  47. MSavoritias (fae,ve)

    yeah

  48. nicoco

    Raaaaaahhh I wrote a long MR description in gajim's gitlab and it was "detected as spam", and "previous" in the browser does not recover the content. :rage:

  49. Kris

    😨

  50. nicoco

    I guess it's related to the issues of this weekend, they probably were under attack and had to mitigate with aggressive spam measure protections, I also had trouble commenting on issues yesterday…

  51. Schimon

    Why dtatus messages are shown in Chat but are absent from Roster and Profile dialog?

  52. cal0pteryx

    Schimon: your question has been heared. Please be patient.

  53. Schimon

    cal0pteryx, I just made it clear that status messages are supported and read by Gajim. Previously, I implied that status messages are shown only in MUC.

  54. nicoco

    Schimon: the contact details dialog does not show the presence status message. Currently, AFAIK, the presence status message is only shown in the "Contact list" tooltip.

  55. nicoco

    But in the next version it'll be in the "chat banner", cf https://dev.gajim.org/gajim/gajim/-/commit/442328c20ca0bf15914b9aa1387d87271260c998

  56. nicoco

    (and maybe elsewhere too: <https://dev.gajim.org/gajim/gajim/-/merge_requests/977> and <https://dev.gajim.org/gajim/gajim/-/merge_requests/976>)

  57. Schimon

    Great. Thank you, nicoco.

  58. Schimon

    Staus messages are quite useful when interacting with bots like MAXS which shows battery status and RSS bot which shows how many news items are available.

  59. mrdoctorwho

    is it only me, or gajim is unable to send images with size below 5KB?

  60. meson

    mrdoctorwho: anything in the logs?

  61. mrdoctorwho

    meson, could you remind me please how to start gajim in debug mode? Looks like the -v option is ignored

  62. Polixgen

    > Polixgen: it is standardized (Kris: XEP-0319, it's even "stable", wow) and implemented. Go to your contact list, it's in the tooltip over contacts. Ofc, your contact must use a client that supports this feature, and they must have it enabled. I think it should be more easily, my WIP attempts: https://dev.gajim.org/gajim/gajim/-/merge_requests/977 and https://dev.gajim.org/gajim/gajim/-/merge_requests/976 ;) nicoco, where is the tooltip?

  63. nicoco

    Bottom left icon with your own avatar, you see your contact list, leave the mouse cursor on a contact's row for one 1 sec, it should appear.

  64. nicoco

    Polixgen: it is buried but it should be unburied in the next release. Note that unlike some other messengers, this is not an indication of when this contact has last sent a message: it is something that their client optionally sends. Gajim will display whatever their client has sent. Also, not a lot of clients actually send this payload, so you will not see it on a lot of contacts, depending on what they use.

  65. meson

    mrdoctorwho: linux or Windows?

  66. mrdoctorwho

    meson, linux

  67. meson

    Mhm, I only know about "-v".

  68. ann

    is there any plans to make gajim a bit faster? or its a python limitation that if you switch the chats you have 1.5sec lags on ryzen 4700?

  69. ann

    its not a trolling.

  70. mrdoctorwho

    +

  71. meson

    ann: do you have participants list open?

  72. meson

    It should be much faster if it is closed

  73. ann

    > ann: do you have participants list open? I'm switching between private conversations, not the MUCs.

  74. ann

    by the way I'm using XMPP as a main messenger and there are 100k+ messages in MAM, that always trying to re-sync to achieve consistency

  75. ann

    that slowdowns started to happen in Gajim 1.7+ and in 1.8 its just got worse

  76. ann

    xmpp server is also selfhosted so no limits to re-sync archived messages unlike public instances, so that may be the case

  77. nicoco

    Is it really 1.5sec?

  78. ann

    I'll make a vod

  79. meson

    ann: you could profile gajim and look where it consumes cpu time on switching

  80. nicoco

    I also have a lot of messages and I agree that switching chats, even 1:1, is not "snappy". But it's certainly below 1.5sec.

  81. ann

    no. it's more likely 0.9 sec.

  82. ann

    Gajim uses only 54%WCPU when switching chats

  83. ann

    https://im.ebala.net:5821/upload/pjO28LEJHJqTQRKj5cYevuCT/4FVEVxEfTaifqRncnmEsXQ.mp4

  84. ann

    so that's not likely python singlethreading bottleneck

  85. Link Mauve

    ann, you could use `perf top -p $(pidof gajim)` to see which C function calls it’s doing, make sure you have debug symbols installed.

  86. Link Mauve

    You could also start Gajim with --cprofile to see which Python function calls it’s doing.

  87. ann

    I'll do that, thank you.

  88. nicoco

    A few years ago it was way worse but the devs already did impressive work on gajim's "snappiness".

  89. ann

    Gajim 1.4 (or whatever version it was on oldstable Debian) was blazingly fast by the way

  90. ann

    but idk is it regression in Gajim or in Gtk3

  91. MSavoritias (fae,ve)

    its the opposite to me so thats definetily weird

  92. meson

    from the recording, the first switch took about 1 second, the 2nd 0.7 s and the last one 170 ms.

  93. MSavoritias (fae,ve)

    and according to the changelog it should be faster

  94. ann

    yes as I told it was 0.9 sec. still it is veey slow

  95. ann

    missed a bit with 1.5, but still

  96. meson

    an, alternatively you can use `snakeviz` to profile gajim. See https://jiffyclub.github.io/snakeviz/

  97. meson

    an, alternatively you can use `snakeviz` to analye profile gajim. See https://jiffyclub.github.io/snakeviz/

  98. meson

    an, alternatively you can use `snakeviz` to analyie the profile. See https://jiffyclub.github.io/snakeviz/

  99. meson

    an, alternatively you can use `snakeviz` to analyze the profile. See https://jiffyclub.github.io/snakeviz/

  100. Link Mauve

    Is the cprofile file stored anywhere?

  101. Link Mauve

    Or do we just get the pstats output?

  102. nicoco

    I don't know much about profiling tools (to say the least), and it's not as slow for me as it is for ann (I am on a Ryzen 9350X) but I tried to profile a gajim session where I frantically switch between tabs, with my main gajim profile (where I have a huge history of messages in a lot of MUCs).

  103. nicoco

    https://upload.slidge.im:5281/file_share/2VVQ5eOUTaRm_iCLqxfgBehb/Screenshot_20231002_142651.png

  104. meson

    nicoco, looks similar for me

  105. nicoco

    I'm not sure I'm reading that right… Does this mean `gajim.gtk.conversations.view.ConversationView._insert_message()` is where a potential optimization would be useful? In the body of the func itself or maybe call it less often, or maybe delegate to something done in the background…?

  106. ann

    I'll try to profile a things and will return with results

  107. meson

    https://share.conversations.im/meeson_/qOX0YHkurOBJT2rr/Screenshot_20231002_143634.png

  108. Link Mauve

    nicoco, that’s one location where this would be useful yes, it would gain 2s of CPU time over the entire run time of your profile.

  109. Link Mauve

    Here when switching tabs a few times, gajim/gtk/conversation/view.py:259(_reset) is the heaviest function call, it’s only called 15 times but takes 28ms per call.

  110. Link Mauve

    Just removing all rows from the list box.

  111. Link Mauve

    I think you’d gain a lot by moving to GTK 4 and using the list model instead.

  112. VA1DER

    Probably gain more from moving to a compiled language. ;)

  113. Link Mauve

    VA1DER, during a tab switch, most of the time seems to be spent removing and readding widgets, no language change will fix anything there.

  114. Link Mauve

    GTK is already written in C, which is reasonably efficient.

  115. chud

    An efficient language can't fix an inefficient algorithm:)

  116. Mike

    Does Gajim support Chinese typing?

  117. VA1DER

    Tab switches seem to be reasonably performant. Going from here to Prosody's chat room is an eyeblink. Does it really matter if it's 100ms or 400ms? I wouldn't think that is worth the work and pain involved in a major widgetset change.

  118. Link Mauve

    VA1DER, a user before you reported it would take as much as 1s.

  119. Link Mauve

    This isn’t an eyeblink.

  120. VA1DER

    1) Is that an objective or subjective "one second"? Your numbers seem to suggest a switch takes ~420ms. 2) When there are visual cues telling the user that the switch is in progress (the destination tab remaining highlighted even when the mouse moves off it) then the user knows it's working and one second isn't an unreasonable delay. 3) With almost 100% certainty the user will be running on a multi-core system where one second of high cpu usage on one core is unlikely to affect other processes.

  121. Katze

    Hi, I'm currently encountering an error in my client because another user (probably a different client) has an OMEMO `signedPreKeyPublic` with a `signedPreKeyId` of zero (0) which trips up the code over here: https://dev.gajim.org/gajim/omemo-dr/-/blob/a953803d64c80146e818cf62d15a205f0dc206cc/src/omemo_dr/state/prekeybundle.py#L57 `eu.siacs.conversations.axolotl` is used here, which I assume is XEP-0384 0.3.0. Reading that version I don't see any limitation that would prohibit the use of 0 as an ID, while the current version of the standard, using different names ( `signedPreKeyPublic` vs. `spk` either way), does explicitly disallow 0, while also using 0 in the following example (https://xmpp.org/extensions/xep-0384.html#bundles) which is rather confusing. To keep this short, it seems that there are implementations that have an id=0 for the axolotl's `signedPreKeyPublic`, I just wanted to throw this information *somewhere*, just in case this was not known. At the very least I haven't found much in terms of the error message in the link to the corresponding code. I can try and figure out which client used that id if it's important and/or someone wants to follow up on that.

  122. lovetox

    Katze, yes it would be interesting which client used this

  123. lovetox

    i need to look if this leads anywhere to problems allowing 0

  124. Katze

    > Katze, yes it would be interesting which client used this I'll try and figure it out, the peer sadly uses like five different clients so it's gonna be fun. I'll get back to you.

  125. lovetox

    yeah seems hard to do actually

  126. lovetox

    in the protocol only device ids are used, but they are usually never exposed somewhere in the GUI

  127. lovetox

    what you can do in gajim is

  128. lovetox

    when does this error show in the logs?

  129. lovetox

    when you try to send a message?

  130. lovetox

    does the contact also use Gajim?

  131. lovetox

    to fix it, the contact could use gajim advanced pep config dialog, to delete the bundle

  132. lovetox

    and then hopefully the client will publish something with a higher ID

  133. Katze

    > yeah seems hard to do actually oh, don't worry, I'll get through this and I'll have fun figuring out things with device IDs and diving into XML. I wanted to acquaint myself with the XMPP OMEMO impls for a while. > when does this error show in the logs? on startup of gajim. When I just run it from the CLI without parameters it's a single error that's being logged, if I run it with verbose flags I get a *lot* of additional information before and after, including the full response that fails the check. I'll see if I can grab the query that causes it real quick.

  134. lovetox

    hm, actually you can figure it out i think

  135. lovetox

    it is a device for which you dont have a fingerprint

  136. lovetox

    because gajim can not parse the bundle, you cant see the key in the trust dialog

  137. lovetox

    so just ask you contact for all his device fingerprints

  138. Katze

    The error: ```text 10/02/23 14:52:06 (E) gajim.c.m.omemo (benary.org) Building session failed: Signed pre key id out of range ``` ```text 10/02/23 14:52:05 (I) omemo_dr.session_manager (benary.org) Saved devices for [person] 10/02/23 14:52:05 (I) omemo_dr.session_manager (benary.org) Missing device sessions for [person]: [1984947357] 10/02/23 14:52:05 (I) nbxmpp.m.omemo (benary.org) request_bundle(jid=[person], device_id=1984947357) 10/02/23 14:52:05 (I) nbxmpp.m.pubsub (benary.org) request_items(node=eu.siacs.conversations.axolotl.bundles:1984947357, max_items=1, jid=[person]) ```

  139. lovetox

    or simply write him a message, and ask him on which device he didnt receive the message

  140. lovetox

    thats the one then

  141. lovetox

    you cannot figure it out from the logs, because device ids are never linked to presence of devices

  142. lovetox

    but yeah i will see that omemo lib accepts 0

  143. lovetox

    its the lesser evil i think

  144. lovetox

    so basically all these gateways to messengers break e2e encryption

  145. polarian

    > Is there anything wrong with this stanza? > ``` > <message type="groupchat" id="1758461952" from="-608413854@zg.94.177.207.80/D/K (1382500964)" to="bqdiscord@94.177.207.80"><subject>1758461952 | D/K (1382500964) | 18 Sep 2023 04:51:17 | хрк</subject><delay xmlns="urn:xmpp:delay" from="-608413854@zg.94.177.207.80" stamp="2023-09-18T04:51:17Z"></delay><x xmlns="jabber:x:delay" from="-608413854@zg.94.177.207.80" stamp="20230918T04:51:17"></x></message> > ``` yes it contains the word "discord"

  146. lovetox

    Gajim writes it usually to the log if something is wrong

  147. fjklp

    I just experienced chat not scrolling down when posting while chat is scrolled up. I'm using Xorg. Just an FYI.

  148. fjklp

    Not a complaint. I probably prefer that. It's just that sometimes it scrolls down and other times not.

  149. fjklp

    is there a default timespan limit on chat searches in gajim?

  150. lovetox

    there is no limit period

  151. lovetox

    if you scroll you can search through all results

  152. fjklp

    thanks

  153. fjklp

    I was just a bit surprised at the speed, especially when selecting "search all chats"

  154. fjklp

    I was just a bit surprised at the speed, especially when selecting "search all chats", and being case-insensitive

  155. fjklp

    maybe it does a new search every time it loads more results

  156. cal0pteryx

    Gajim 1.4 to 1.5 was where we switched from "having widgets for _all_ chats rendered at once" to "render only what is displayed at the moment". This is way better regarding RAM usage, which significantly dropped from 1.4 to 1.5. Now since 1.5, to switch chats, gajim needs to 1) remove all widgets from the old chat (destroy) and 2) add all widgets to the new chat (db query + widget creation). Creating and removing widgets takes the biggest part. But there are certainly ways to optimize this. What I observed for the search view was for example that disabling the sorting function before removing all row widgets would speed things up a lot, because GTK would not try to sort after each removed row. I guess there is more, but the would need proper profiling and a bit of fiddling/testing :)

  157. cal0pteryx

    For me it's almost instantly

  158. lovetox

    we dont disable sort

  159. lovetox

    thats bad

  160. cal0pteryx

    :)

  161. lovetox

    hm or not

  162. lovetox

    we remove rows from the top, not randomly

  163. lovetox

    why would a sort algo sort anything if you remove the top row

  164. Link Mauve

    From the top means copying the full array minus one for each element removed?

  165. Link Mauve

    Is it even using an array?

  166. lissine

    About this: I once used search to lookup an audio file, and it was far away in the chat history. I started playing it and then used the scroll-down arrow button, and audio playback immediately stopped

  167. lovetox

    yes this is expected

  168. lovetox

    how would you stop the audio afterwards?

  169. lovetox

    go back to search and try to find it?

  170. fjklp

    playback controls in the chat banner area :)

  171. fjklp

    (joking)

  172. lovetox

    yeah of course, lets add a dialog where you can add a music folder, and then you can play your music collection over gajim :D

  173. lovetox

    Link Mauve, we are talking about Gtk.ListBox, i guess it uses a Gio.ListStore

  174. lovetox

    > It provides insertions, deletions, and lookups in logarithmic time with a fast path for the common case of iterating the list linearly.

  175. lovetox

    i doubt this has any noticeable impact

  176. Link Mauve

    lovetox, g_list_store_remove_all() might be much faster than iterating and removing each element.

  177. Link Mauve

    Although it could also just iterate internally, I don’t know.

  178. Link Mauve

    g_list_store_splice() might be even faster, since it could avoid deallocating and reallocating widgets.

  179. lovetox

    its not available on Gtk.ListBox

  180. lovetox

    it does not expose the underlying model

  181. Link Mauve

    Ah…

  182. lovetox

    you can bind one yourself, but then you need to implement sorting and filtering yourself

  183. lovetox

    we could simply destroy the whole listbox alltogether

  184. lovetox

    and add a new instance

  185. Link Mauve

    This might make a difference.

  186. Link Mauve

    Hopefully this will use g_list_store_remove_all().

  187. lovetox

    its not only about removing from a list

  188. lovetox

    it needs to destroy all widgets anyway

  189. lissine

    > yes this is expected > > how would you stop the audio afterwards? > > go back to search and try to find it? the audio would play until it finishes :)

  190. cal0pteryx

    That would be _really_ bad without a button to stop it. Pragmatic way is to simply stop playback when jumping to the bottom.

  191. bot

    Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < https://dev.gajim.org/gajim/gajim >: *03590b3b* < https://dev.gajim.org/gajim/gajim/-/commit/03590b3b75fad55d377135e4759cde96138d85aa > perf: View: Reset view faster

  192. lovetox

    https://share.hoerist.com/philipp/qTteRxP0dkEaZYUs/Screencast_from_2023-10-02_23-13-31.webm

  193. lovetox

    thats the speed of switching on my machine

  194. lovetox

    seems fast enough

  195. Link Mauve

    lovetox, we can’t see when you click to get to feel the latency.

  196. Link Mauve

    On my laptop it clearly doesn’t feel instantaneous.

  197. lovetox

    of course it isnt, and it never will

  198. Link Mauve

    Why that?

  199. lovetox

    because creating many widgets takes sometime

  200. lovetox

    but, then its shiny, if you want instant use a console

  201. lovetox

    and i didnt use my mouse, i used hotkeys to switch

  202. lovetox

    otherwise i would be even slower

  203. Link Mauve

    lovetox, then it won’t “never will”, it will start being fast once you don’t recreate hundreds of widgets but only the ones displayed, when using GTK 4.

  204. Link Mauve

    lovetox, oh, using the mouse is slower?

  205. lovetox

    i mean yes your input will be slower

  206. lovetox

    if i hit a button 10 times, its faster then you moving your mouse from row to row and click

  207. lovetox

    And yes i very much like the listview in gtk4, and sure it would bring performance gains

  208. lovetox

    but i would say in the low 2 digit count

  209. lovetox

    does this really justify rewriting 10th of tousand code lines

  210. cal0pteryx

    lovetox: great, that looks snappier

  211. lovetox

    in my work i need to use MS Teams half of my day, its much slower then Gajim. But i never had the thought, oh i could get more work done if MS Teams was half a second faster on each action

  212. lovetox

    i mean i see that big lag like 1+ seconds, is just annoying

  213. lovetox

    but i dont feel it doesnt matter if you switch in 0.5, or 0.3 seconds

  214. Link Mauve

    I don’t have user studies to back it up, but annoyance at a piece of software grows quickly with actions being slower.

  215. Link Mauve

    I’m sure there are studies you could find about that.

  216. Link Mauve

    And I’ve read a ton of people being extremely annoyed at MS Teams.