Opened 11 years ago

Closed 11 years ago

#3462 closed Enhancement (fixed)

minor json rpc optimization: omit unnecesary floating-point precision

Reported by: charles Owned by: charles
Priority: Normal Milestone: 2.10
Component: libtransmission Version: 2.03
Severity: Minor Keywords:
Cc:

Description

When writing numbers to our json stream, we often have real numbers whose values are whole numbers, but write out their value to 4 decimal places anyway such a "percentDone:1.0000." In these cases, where the integer value and the floating-point value are equivalent, we can save a few bytes by omitting the trailing ".0000".

Change History (2)

comment:1 Changed 11 years ago by charles

  • Status changed from new to assigned
  • Summary changed from minor json formatting optimization to minor json rpc optimization: omit unnecesary floating-point precision

comment:2 Changed 11 years ago by charles

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

Added to trunk by r11079

Note: See TracTickets for help on using tickets.