Skip to content

Request body size can be cut down to improve transmission efficiency #32

Open

Description

@panyy3
No description provided.

Activity

  1. panyy3 commented on Mar 1, 2019

    @panyy3
    Author

    When reading the source code, I found that request body size can be cut down to improve transmission efficiency if update the line L712 in file python-redfish-library-master/src/redfish/rest/v1.py.
    Before improve:
    body = json.dumps(body)
    After improve:
    body = json.dumps(body, separators=(',',':'))

    So I suggest to update code to improve transmission effeciency. Can anyone help on this?

  2. panyy3 commented on Mar 6, 2019

    @panyy3
    Author

    Compare the request json body
    Before improve:
    {"data": [48, 79, 121, 66, 84, 70, 120, 97, 84, 122, 74, 51, 43, 101, 88, 73, 51, 109]}
    After improve:
    {"data":[48,79,121,66,84,70,120,97,84,122,74,51,43,101,88,73,51,109]}
    From the comparison, we can know that request body size is cut down, so the transmission efficiency is improved.

  3. panyy3 commented on Mar 6, 2019

    @panyy3
    Author

    Useless blank is removed from request body after improvement.

  4. mraineri commented on Mar 7, 2019

    @mraineri
    Contributor

    While we can see that it's definitely removing extra characters, do you have any measurements for performance improvements with this change? We don't suspect that there would be much change since since most of the time would be spent in opening/closing the connection, and not necessarily on the body of the payload.

  5. panyy3 commented on Mar 8, 2019

    @panyy3
    Author

    Yes, you are right. Most of the time would be spent in opening/closing the connection.
    Although I have no measurements for this change, request body payload size will also impact the Redfish service server side's dealing. Server will need more space to deal the body payload with useless blanks, and will easily to reach the dealing body size limitation. This change will help to avoid this kind of problem.

  6. mraineri commented on Mar 21, 2019

    @mraineri
    Contributor

    We could add it as an optional parameter to compress the payload. Realistically speaking, we're not seeing a huge problem with size limitations in client requests (generally speaking, they tend to be over 1MB).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions