xpra icon
Bug tracker and wiki

Opened 6 years ago

Closed 4 years ago

#486 closed enhancement (fixed)

better xpra info namespace

Reported by: Antoine Martin Owned by: alas
Priority: major Milestone: 0.17
Component: core Version:
Keywords: Cc:

Description

Despite many changes to the namespace code: r4752, r3914, r3883, r3825, r3739, r3689, r3684, r3680, r3674, etc..

This is still wrong and stoopid. The data should be structured in nested dictionaries and we should let the client flatten it when printing it out.

ie:

window[1].encoding.speed.90p=65
window[1].encoding.speed.cur=50
...

should be sent as:

windows : {
    1 : {
        "encoding" : {
             "speed" : {
                 "90p" : 65,
                 "cur" : 50,
             }
        }
    }
}

Which makes much more sense than building strings client-side for looking up the data we want!

Attachments (3)

info-namespace.patch (85.6 KB) - added by Antoine Martin 4 years ago.
work in progress patch
info-namespace-v2.patch (111.0 KB) - added by Antoine Martin 4 years ago.
updated patch
info-namespace-v3.patch (140.3 KB) - added by Antoine Martin 4 years ago.
updated patch - mostly complete

Download all attachments as: .zip

Change History (13)

comment:1 Changed 6 years ago by Antoine Martin

Owner: changed from Antoine Martin to Antoine Martin
Status: newassigned

comment:2 Changed 6 years ago by Antoine Martin

Milestone: 0.12future

A good idea, but difficult to implement. Re-scheduling.

comment:3 Changed 4 years ago by Antoine Martin

Milestone: future0.17

Let's expose the new info via the dbus interface (#904), so we can generate the data in a more structured format and flatten it for the old interface.

The new interface can also include a subsystem filter, and a regex filter so we can avoid sending too much stuff.

comment:4 Changed 4 years ago by Antoine Martin

This should be taken advantage of to reduce the cost of the info packets we send when the session statistics dialog is shown.
The packet should also be compressed and then sent from the worker thread rather than UI and network threads. It could also be compressed much more from the worker - though this should be moot if we have filtered enough.

Changed 4 years ago by Antoine Martin

Attachment: info-namespace.patch added

work in progress patch

Changed 4 years ago by Antoine Martin

Attachment: info-namespace-v2.patch added

updated patch

Changed 4 years ago by Antoine Martin

Attachment: info-namespace-v3.patch added

updated patch - mostly complete

comment:5 Changed 4 years ago by Antoine Martin

Along the way, fixed two major bottlenecks in xpra info: r12178 + r12179.
Which should be backported.

With those improvements, the info request takes mere milliseconds to process and the resulting packet is now much smaller. This means that the filtering becomes much less important.

comment:6 Changed 4 years ago by Antoine Martin

Mostly done in r12183. See commit message.
(xpra info performance fixes backported in r12185 + r12186)

The xpra info client can now also be used to print the structured data without flattening it:

XPRA_FLATTEN_INFO=0 xpra info

The code is now much faster and cleaner. In terms of user visible changes, there should not be any (bar cosmetic ones in xpra info output).

Things left to verify / fix:

  • session info, ie: fix encoding speed and quality not shown
  • test bug report tool
  • av-sync (verify the queue levels are still being passed through)
  • test proxy server?
  • command line tools output
Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:7 Changed 4 years ago by Antoine Martin

More conversion and fixes: r12224 (gtk info), r12206 (net caps), r12189 (fix child reaper and test), r12261 (misc), r12262 (session info), r12265 + r12266 + r12267 (related refactoring)

As of r12264:

  • XPRA_FLATTEN_INFO=1 xpra info or just xpra info prints the info data (almost) the same as before
  • XPRA_FLATTEN_INFO=0 xpra info prints the data in a dense python structure format (useful for loading up into an interpreter for example)
  • XPRA_FLATTEN_INFO=2 xpra info will print a more user-friendly format (indented)
Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:8 Changed 4 years ago by Antoine Martin

Owner: changed from Antoine Martin to alas
Status: assignednew

I have verified everything except the proxy server.

@afarr: mostly a FYI, feel free to close. (will follow up in #1154)

Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:9 Changed 4 years ago by Antoine Martin

Fix for the dbus server (#904) in r12300.

comment:10 Changed 4 years ago by J. Max Mena

Resolution: fixed
Status: newclosed

This notification is here to notify you that this has been noticed.

Closing.


The flatten info flag definitely produces a drastically different output.

Note: See TracTickets for help on using tickets.