Flowdock
method

needs_encoding?

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveRecord::XmlSerializer::Attribute

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

needs_encoding?() public

There is a significant speed improvement if the value does not need to be escaped, as tag! escapes all values to ensure that valid XML is generated. For known binary values, it is at least an order of magnitude faster to Base64 encode binary values and directly put them in the output XML than to pass the original value or the Base64 encoded value to the tag! method. It definitely makes no sense to Base64 encode the value and then give it to tag!, since that just adds additional overhead.

Show source
Register or log in to add new notes.