Git Product home page Git Product logo

Comments (2)

YK-Samgo avatar YK-Samgo commented on June 2, 2024 1

I figured out what cost so much CPU.

In proxy/http/proxy/server.py:279: self.response.parse(raw)

This costs most of the CPU. I don't see anything necessary. Can you just remove it or add a switch to disable it?

Without this line, the speed is acceptable though performance loss

sudo curl -v http://127.0.0.1/api/bigfile -o /dev/null -x 'http://127.0.0.1:8899'
*   Trying 127.0.0.1:8899...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 127.0.0.1 (127.0.0.1) port 8899 (£0)
> GET http://127.0.0.1/api/bigfile HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/7.74.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 28 Feb 2024 09:40:05 GMT
< Server: Apache/2.4.56 (Debian)
< Upgrade: h2,h2c
< Connection: Upgrade
< Last-Modified: Wed, 28 Feb 2024 09:25:24 GMT
< ETag: "100000000-6126db8fc99f6"
< Accept-Ranges: bytes
< Content-Length: 4294967296
<
{ [65281 bytes data]
100 4096M  100 4096M    0     0   581M      0  0:00:07  0:00:07 --:--:--  627M

from proxy.py.

abhinavsingh avatar abhinavsingh commented on June 2, 2024

Thank you @YK-Samgo for reporting this. I have been away from proxy.py for too long. I hope to wrap pending PRs and open issues in upcoming release. 🙏

from proxy.py.

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.