Giter Site home page Giter Site logo

Comments (6)

JonasKs avatar JonasKs commented on May 23, 2024 1

I know I haven't commited any code for anyone to look at, but I want it to be a bit more finished and tested before I let people see. Right now it's not organized, not documented and not pretty.

I've tested the memory consumption of uvicorn with and without the async Django-GUID middleware(as the only middleware). It does not matter if I send 1000 requests or 100000, the memory consumption difference is always about 0.13MB. There is no memory leak, only a bit more memory consumption.

# 100k requests with Django-GUID async supported middleware
# start memory
353408K
# 100k requests later
670792K

# 100k requests _without_ Django-GUID async supported middleware
# start memory
353400K
# 100k requests later
670924K

EDIT: Forgot to write that a GUID is 16 byte, so 100k requests would be 1.6 MB - which is 1.3MB more than the actual memory consumption.

from django-guid.

JonasKs avatar JonasKs commented on May 23, 2024

I did create a asgi branch, wrote a simple asgi application and started testing out the asgiref api. How ever, it didn't behave as I expected and while there is a readme, the API isn't really documented or got any examples. That being said, I'll continue looking into this soon as Django 3.1 is getting closer.

from django-guid.

JonasKs avatar JonasKs commented on May 23, 2024

I've found the solution for this. Will be implementing this the following week.

from django-guid.

JonasKs avatar JonasKs commented on May 23, 2024

Sorry for few updates on this one, but I can assure that it's being worked on. There's been a few obstacles, but design, pattern and implementation is about to be finished.

I've also been in touch with Andrew Godwin regarding a potential memory leak.

from django-guid.

JonasKs avatar JonasKs commented on May 23, 2024

Busy weeks. Getting there though.
Sync middleware works as expected, all tests pass. Looking into how to properly write tests for the async middleware now. Release should not be too far away. :)

from django-guid.

JonasKs avatar JonasKs commented on May 23, 2024

Coverage is at 100%, docs are almost done.

from django-guid.

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.