Open
Description
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.