Skip to content

Add method to use buffered IO (mod-lua) #17

@champtar

Description

@champtar

Right now uhttpd.send() just calls write() to stdout, thus potentially doing lots of small writes.
Using buffered io for prometheus-node-exporter-lua reduces the netclass collector scrape time from 230ms to 170ms
https://github.com/openwrt/packages/pull/26860/files#diff-bfae82b02aa972d6c7a6848c12c61fe5af113318ddaacde9db8d89692112fe4bR90

Is there a reason not to use buffered io I'm missing ?
Should uhttpd.send() use buffered io by default ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions