8000 Print::print(const __FlashStringHelper *) is very inefficient · Issue #6524 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content
Print::print(const __FlashStringHelper *) is very inefficient #6524
Closed
@nomis

Description

@nomis

The implementation calls pgm_read_byte() to read every character. This is inefficient because it will read every block of 4 bytes multiple times.

It calls calls write(c) for every character. This is very inefficient at the network level if TCP_NODELAY is turned on because suddenly all flash strings are sent out as one byte per packet.

It should use strncpy_P() with a small buffer instead.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0