SOGo WebUI slow on mobile devices

NethServer Version: 7.9.2009
Module: Sogo

Hello,
I am having difficulties with a very slow response of the SOGO WebUI frontend in mail view on mobile devices. (Message list scrolling is very slow, opening a message is very slow, and after a while the WebUI is nearly non-respondent. It seems, that the problem arise mainly when the mail folder contains a lot of messages ( 10.000 and more). The problem affects just the WebUI on mobile devices, there is no problem on desktops.)

I’ve noticed this problem some time ago already, with SOGo version 4.0.8. (NethServer 7.6). I have resolved the problem then by downgrading the SOGo package to version 4.0.4.1, which worked fine.
Unfortunately, after the recent upgrade to NethServer release 7.9.2009, the included package SOGo 5.1.0 is still suffering from this problem and the option to downgrade to SOGo 4.0.4.1 is no more available.
As I have learned by a little bit rude investigation by manualy replacing files in /usr/lib64/GNUstep/SOGo/WebServerResources/ by the ones from the 4.0.4.1 version, the problem lies around the js/Mailer.services.js file. When I replace this file by the old one, the response is good again! But, unfortunately, the solution is not viable, because the New message dialog is not working with this.

I have tried several recommendations from various forums (eg. tuning the WOWorkersCount parameter), but without any effect.

If anyone would have an idea, how to overcome the problem described (either by tuning SOGo or finding a way to donwgrade to the old version… ?), it would be very appreciated.

Thanks.

Hi @daz,

I am afraid we can not do much about this issue, even though we compile and package SOGo ourselves the (js) web resources are pretty much pre-generated.

You may search Sogo’s bugzilla if someone selse has the same issue.

The only directions I can give is try an other browser on your mobile device.
Out of curiosity (and also for other to identify the issue) which Mobile-OS and browser do you use?

Hi @mark_nl,
thank you for your feedback.
The issue appears to be the same on all from the few Android mobile devices I have tested it (Lenovo tablet, Samsung Galaxy S7 (sorry I don’t have more detailed system info about these two at hand), Xiaomi Redmi 4x - Android 7.1.2), both in Chrome and Edge browsers. I have not tested it on iOS devices.
BTW. is there any way to downgrade the SOGo package on NethServer release 7.9.2009 to the sogo-4.0.4-1.ns7.x86_64 version, which worked best for me?
Thanks!

May i suggest to try Firefox too? (Edge and Chrome use the same engine nowadays)

The riscy hacky way is to pull it in from a old nethserver-repoitory. This is risky because those packages are build on (against) older CentOS releases.

!! SO I ADVISE AGAINST IT !! but if you insist you may create a yum repo configuration for it /etc/yum.repos.d/NethForge-7.7.1908.repo with this content:

Summary
[nethforge-old]
name=NethForge 7.7.1908
baseurl=http://packages.nethserver.org/nethserver/7.7.1908/nethforge/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NethForge-7
gpgcheck=1
repo_gpgcheck=1
enabled=0
enablegroups=0

with yum --disablerepo=nethforge --enablerepo=nethforge-old you have acces to the old repository.

Better is to build your own SOGo, it is pretty detailed described here:

1 Like

May i suggest to try Firefox too?

I have just tried it and the behaviour is even worse (slower) than in Chrome / Edge. (But cannot compare with the old SOGo version, because I didn´t try it with Firefox then).

Thank you for the advice with the old repo. I will consider trying it in some sandbox environment.

You’d probably need to dig into the logs to see if anything pops up. I use SOGo on my mobile android Chrome/Firefox all the time without issue or slow speeds.

Hi @royceb,
how many messages do you have in your mail folders approximately? (It seems in my case that the response depends on the amount of messages in them).
Thanks.

May I suggest to use the good tools, I take little nails with a little hammer. You should use a client IMAP or imapsync with android.

Now with the F… javascript the load is on the client side, so obviously except if you have a Formula 1 of android I am really not surprised that your mobile with 10 000 emails in the inbox is SLOW.

Hi,
thank you all for you inputs.
After some unsuccessfull attempts (

  • building own SOGo not possible, because packages for the version 4 no more available
  • installing old version from the old repository partially successfull, but mail sending not working
    )

it seems, that the problem was finally resolved for me by editing few lines (after deminifiing) in the
/usr/lib64/GNUstep/SOGo/WebServerResources/js/Mailer.services.js (lines 246 to 259, basically replacing them with the corresponding code from the 4.0.4 version)

2 Likes

Nice you are sorted out

Can you be a little more specific?
Who knows maybe we can report this upstream ?

Here the is a gist of unminified Mailer.services.js taken from the master branch of the SOGo git repository

Can you be a little more specific?

Yes, sure.

Original code (Mailer.services.js from SOGo 5.1.0):

    d.prototype.init = function(e) {
    (angular.isUndefined(this.uidsMap) || e.headers) && (this.$isLoading = !0, this.$messages = [], this.uidsMap = {}), angular.extend(this, e), this.path && (this.id = this.$id(), this.$acl = new d.$$Acl("Mail/" + this.id), this.threaded && (this.$collapsedThreads = [], d.$Preferences.settings.Mail.threadsCollapsed && d.$Preferences.settings.Mail.threadsCollapsed["/" + this.id] && (this.$collapsedThreads = d.$Preferences.settings.Mail.threadsCollapsed["/" + this.id]))), this.$displayName = this.name, this.type && (this.$isEditable = this.isEditable(), this.$isSpecial = !0, "inbox" == this.type ? (this.$displayName = l("InboxFolderName"), this.$icon = "inbox") : "draft" == this.type ? (this.$displayName = l("DraftsFolderName"), this.$icon = "drafts") : "sent" == this.type ? (this.$displayName = l("SentFolderName"), this.$icon = "send") : "trash" == this.type ? (this.$displayName = l("TrashFolderName"), this.$icon = "delete") : "junk" == this.type ? (this.$displayName = l("JunkFolderName"), this.$icon = "thumb_down") : "additional" == this.type ? this.$icon = "folder_shared" : (this.$isSpecial = !1, this.$icon = "folder")), this.$isNoInferiors = this.isNoInferiors(), angular.isUndefined(this.$shadowData) && (this.$shadowData = this.$omit())
}, d.prototype.selectFolder = function() {
    d.$virtualMode || (d.selectedFolder = this)
}, d.prototype.getLength = function() {
    var n = !1;
    return _.filter(this.$messages, function(e, t) {
        return e.first ? n = e.collapsed : e.level < 0 && (n = !1), e.first || !1 === n
    }).length
}, d.prototype.getItemAtIndex = function(e) {
    var t, n = !1,
        s = _.filter(this.$messages, function(e, t) {
            return e.first ? n = e.collapsed : e.level < 0 && (n = !1), e.first || !1 === n
        });
    return 0 <= e && e < s.length && (t = s[e], this.$lastVisibleIndex = Math.max(0, e - 3), this.$loadMessage(t.uid)) ? t : null

modified code (taken from ver. 4.0.4):

d.prototype.init = function(e) {
    (angular.isUndefined(this.uidsMap) || e.headers) && (this.$isLoading = !0, this.$messages = [], this.uidsMap = {}), angular.extend(this, e), this.path && (this.id = this.$id(), this.$acl = new d.$$Acl("Mail/" + this.id)), this.$displayName = this.name, this.type && (this.$isEditable = this.isEditable(), this.$isSpecial = !0, "inbox" == this.type ? (this.$displayName = l("InboxFolderName"), this.$icon = "inbox") : "draft" == this.type ? (this.$displayName = l("DraftsFolderName"), this.$icon = "drafts") : "sent" == this.type ? (this.$displayName = l("SentFolderName"), this.$icon = "send") : "trash" == this.type ? (this.$displayName = l("TrashFolderName"), this.$icon = "delete") : "junk" == this.type ? (this.$displayName = l("JunkFolderName"), this.$icon = "thumb_down") : "additional" == this.type ? this.$icon = "folder_shared" : (this.$isSpecial = !1, this.$icon = "folder_open")), this.$isNoInferiors = this.isNoInferiors(), angular.isUndefined(this.$shadowData) && (this.$shadowData = this.$omit())
}, d.prototype.selectFolder = function() {
    d.$virtualMode || (d.selectedFolder = this)
}, d.prototype.getLength = function() {
    return this.$messages.length
}, d.prototype.getItemAtIndex = function(e) {
    var t;
    return 0 <= e && e < this.$messages.length && (t = this.$messages[e], this.$lastVisibleIndex = Math.max(0, e - 3), this.$loadMessage(t.uid)) ? t : null

I am not able to explain it more deeply, it was a matter of comparsion of differences in the file between versions 4.0.4, 4.0.8 (which was the first I noticed the problem earlier) and 5.1.0 and then some intuitive guess what could influence the unwanted behaviour. After several trials and errors I’ve come to this. As for now, I don’t observe any negative side effects of this modification.

4 Likes

Thanks a lot for your experience and report.
Who knows… this might help sogo a bit…

3 Likes