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

Use cursors more appropriately #2

Open
pderop opened this issue Jul 7, 2022 · 0 comments
Open

Use cursors more appropriately #2

pderop opened this issue Jul 7, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@pderop
Copy link
Collaborator

pderop commented Jul 7, 2022

Motivation

Investigate on how to use cursors more appropriately in new multipart codec.
This issue is related to PR #1

Modifications

The following enhancements should be investigate:

  • in HttpPostBodyUtil.findLastLineBreak() method, refactor the method in order to use one single Cursor and pass it as argument to the HttpPostBodyUtil.findLineBreak() method.
  • in HttpPostBodyUtil.findDelimiter() method, see if it's possible to refactor the method in order to replace loops using one single Cursor.
  • Try to optimize the HttpPostStandardRequestDecoder.parseBodyAttributes() method using Cursors.

Results:

using cursors might improve performance. For example, currently, the benchmark is slower compared to old 4.1.x multipart benchmark, and using asyncprofiler, we spend a lot of time in HttpPostBodyUtil.findDelimiter, so there is room for optimization and cursors might improve performance.

@pderop pderop added the enhancement New feature or request label Jul 7, 2022
@pderop pderop self-assigned this Jul 7, 2022
@pderop pderop added this to the 5.0.0.Alpha2 milestone Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant