Ticket #224 (closed Tasks: fixed)

Opened 18 months ago

Last modified 16 months ago

Network I/O should be byte[] based as often as possible

Reported by: octo Owned by: octo
Priority: normal Milestone: 2.0
Component: LogicMail Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking: #219, #222

Description

Right now the Connection facade uses Strings for most of the receive and send calls, and the protocol implementations also work mostly with String data.

This has two major side-effects:

  1. Data handling is very inefficient on memory, which is especially apparent when downloading larger attachments. (likely one cause of #219)
  2. Binary data is messed up as it passes through the protocol layers, forcing unnecessary re-encoding and making a clean implementation of #222 somewhat difficult.

The network layer (Connection class) needs to force the issue, and operate only with byte arrays. Then, the protocol code needs to either operate on byte arrays as well, or convert to Strings prior to parsing. (in the short term, a hybrid may be called for, since this is only a serious problem in a few select areas)

Change History

comment:1 Changed 16 months ago by octo

  • Status changed from new to closed
  • Resolution set to fixed

This is implemented in all the important cases, so I'm closing the ticket. In the places where it still needs to be done, it'll happen as a side-effect of periodic code cleanup efforts.

Note: See TracTickets for help on using tickets.