Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip processing stats in XML frontend #231

Closed
wants to merge 1 commit into from
Closed

Conversation

brian-brazil
Copy link
Contributor

Processing many hundreds of XML elements
that we don't need takes hundreds of milliseconds.

Processing many hundreds of XML elements
that we don't need takes hundreds of milliseconds.
@frank-weinberg
Copy link
Contributor

This breaks the promise that XML and JSON provide the same data set. And while none of our screens currently use those values, it can cause hard to find problems for custom screens or later additions.

At the very least guard it with a 'noStats' (or similar) flag that has to be explicitly set by a page.

@brian-brazil
Copy link
Contributor Author

I'm hoping that we'll have no XML screens in the near-ish future (which is why I'm using this hack rather than optimising), and anyone wanting those should be pointed to the WS.

@frank-weinberg
Copy link
Contributor

Given the amount of effort needed to port operator.js, I'm not so optimistic about that "near-ish".
Plus, the more I work with it the less convinced I am that the current WS interface is actually better than the XML one. (The XML interface transports the object structure a lot better than the key-value pairs used in WS. - See the problems with adding complete new objects (e.g. penalties) or updating multiple keys at once on one end and the rather involved parsing of the keys on the other end.)

@brian-brazil
Copy link
Contributor Author

That's a matter of library support, we've not much tooling for WS yet whereas XML has all that tooling (which is what's slowing things down, as it's all enabled everywhere).

@frank-weinberg
Copy link
Contributor

You may be able to hide it with library support (at the cost of computing time), but that will not change that at its heart the current JSON structure is a set of key value pairs and not a nested set of objects.

@brian-brazil
Copy link
Contributor Author

At the data sizes we're working with, it shouldn't make the slightest difference.

@brian-brazil
Copy link
Contributor Author

Superseded by #260

@brian-brazil brian-brazil deleted the fe-xml-stats-skip branch May 11, 2019 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants