IDL2js delivers lots of unneeded information, adding bulk.

Bug #1292705 reported by Bill Erickson on 2014-03-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Evergreen, post 2.6

IDL2js, which JSON-ifies the IDL for web clients, delivers quite a lot of data that the client does not strictly need. This increases the file size, in-browser memory footprint, and probably execution time when processing IDL2js.

The main issues are:

1. Fields with no values, like "primitive", "restrict_primary", "selector", etc.
2. The "selector" field, when it does have a value, repeats the same value for every field in the class.
3. Fields where a default value is provided by the server, where it could just as easily be provided by the client. For example, "label" defaults to "name" when no "label" exists.
4. The "array_position" field was removed from the IDL proper years ago, yet it still appears in the IDL2js output (and is used by dojo/fieldmapper/IDL.js).

Branch forthcoming to resolve all of these and make the IDL considerably smaller.

Bill Erickson (berick) wrote :

Here's my first stab. It works with tests performed thus far (various conify UIs, some ACQ UIs, basic staff client poking). On my system, this reduced the output size from 731577 bytes to 364109 bytes, just over a 50% size reduction.;a=shortlog;h=refs/heads/collab/berick/lp1292705-trim-idl2js-unneeded-fields

Testers greatly appreciated.

Bill Erickson (berick) on 2014-03-14
Changed in evergreen:
assignee: Bill Erickson (erickson-esilibrary) → nobody
tags: added: pullrequest
Ben Shum (bshum) wrote :

Assigning to beta1 review since this seems good to have.

Changed in evergreen:
milestone: → 2.7.0-beta1
Ben Shum (bshum) wrote :

Tested around and things look okay so far. We'll do more during the actual beta review leading to RC, but pushing to master since there weren't any immediate signs of breakage.

Thanks Bill!

Changed in evergreen:
status: New → Fix Committed
Dan Scott (denials) wrote :

isnew() and the like were broken due to the lost field increment;;a=shortlog;h=refs/heads/user/dbs/lp1292705_fix_IDL2js fixes this (breakage was seen in the patron registration UI).

Ben Shum (bshum) wrote :

Yay Dan!! Thanks for fixing that issue. Pushed your fix into master.

Will continue to test for more issues.

Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers