Coder Social home page Coder Social logo

Comments (4)

gbitzes avatar gbitzes commented on July 25, 2024

Hi Brian,

request->readLine returns data as it becomes available, ie as soon as there's a complete header line separated by \r\n.

1024 is just a protection against buffer overflow, an instruction never to write more than 1024 bytes into the buffer.

What you're observing is probably due to this check: https://github.com/cern-it-sdc-id/davix/blob/devel/src/modules/copy/copy.cpp#L332

The performance information is only updated once a second to avoid printing too much text into the terminal. I could make this behaviour configurable if you're interested, ie changing the time interval, or disabling altogether and printing performance markers as they're received.

from davix.

bbockelm avatar bbockelm commented on July 25, 2024

Look at the case of the first performance marker (assuming no data is buffered in NEONRequest).

The readLine method calls readSegment here:

https://github.com/cern-it-sdc-id/davix/blob/5af51b01abdebeb93915faf4d58e511cd69500aa/src/neon/neonrequest.cpp#L773

Then, readSegment invokes readBlock (which appears to pull in a single encoded chunk from the HTTP transfer) repeatedly:

https://github.com/cern-it-sdc-id/davix/blob/5af51b01abdebeb93915faf4d58e511cd69500aa/src/neon/neonrequest.cpp#L803

As far as I can tell, this is repeated until all 1024 characters (the buffer size in this case) are read.

Playing with a few transfers of multi-GB files with performance markers sent every 2 seconds, it seems that the symptoms match blocking behavior.

from davix.

gbitzes avatar gbitzes commented on July 25, 2024

ahhh, yes... you're totally right.

I committed a fix, want to try?

from davix.

bbockelm avatar bbockelm commented on July 25, 2024

Appears to work -- thanks!

from davix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.