Skip to content

Use cursors more appropriately  #2

Open
@pderop

Description

@pderop

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions