Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • poezio poezio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 179
    • Issues 179
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poezio
  • poeziopoezio
  • Issues
  • #2844

Closed
Open
Created Dec 10, 2014 by louiz’@louizOwner

Input is ignored when a lot of data is received from the server at once.

There are two (almost identical, but not quite) cases:

First, the most obvious, is when we receive a huge stanza. For example a huge list of items like this http://xmpp.org/extensions/xep-0045.html\#disco-rooms
(of course we could use result-set-management to avoid that big stanza, but we don’t always have this possibility, and the server may not support it anyway)

In that case, the list of items is handled with just one function that loops over each items and processes them one by one, without a break, and without giving the possibility to the keyboard to be handled during this process.
The result is that the keyboard is completely ignored during that time.

A solution would be to restore the event queue that was in sleekxmpp (but was implemented with threads which, as you all know, suck), and to use it to process “big stanzas that may contain a lot of items” (for example the room list, the roster, etc) like this: for each item in the stanza, insert a function in that queue. And then, in the main asyncio loop, that queue would be emptied (each item would be processed) one by one, with the same priority as the keyboard or other timers.

The second case is when we receive a lot of stanzas at once, but not necessarily big ones. For example if we join a room with a lot of people in it, we receive each presence in a different stanza. But since we may recv() a lot of data on the socket at once, and since we immediately handle ALL the stanzas that were found in that data (say we receive 4096 bytes, in this contains 50 …, all these 50 stanzas will be handled without a break), we have this “lag” issue again.

A solution is (like for the first issue), instead of processing the stanza immediately, to insert them in the event queue and to dequeue that in the main loop, with the same priority as the keyboard and other timers.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking