Giter Site home page Giter Site logo

problem with requests about cryptoexchange.net HOT 5 CLOSED

jkorf avatar jkorf commented on August 13, 2024
problem with requests

from cryptoexchange.net.

Comments (5)

nikkozp avatar nikkozp commented on August 13, 2024

I find something interesting

protected override void WriteParamBody(IRequest request, string stringData)
        {
            var data = Encoding.UTF8.GetBytes(stringData);
            request.ContentLength = data.Length;
            request.Content = stringData;

            var sw = Stopwatch.StartNew();
            using (var stream = request.GetRequestStream().Result)
            {
                sw.Stop();
                stream.WriteAsync(data, 0, data.Length).ConfigureAwait(false);
            }

            log.Write(LogVerbosity.Warning, $"Stream {request.Uri.AbsolutePath} {stringData} {sw.ElapsedMilliseconds}ms");
        }

and received here is such logs

Stream  /api/my_orders/etc_uah nonce=637067357028739376&out_order_id=847 39ms
Stream  /api/my_orders/xmr_uah nonce=637067357029198343&out_order_id=878 71ms
Stream  /api/balance nonce=637067357028789387&out_order_id=683 573ms
Stream  /api/balance nonce=637067357029528001&out_order_id=432 604ms
Stream  /api/balance nonce=637067357034435910&out_order_id=809 388ms
Stream  /api/my_orders/ltc_uah nonce=637067357029978515&out_order_id=150 898ms

What could be the reason for this delay?

from cryptoexchange.net.

JKorf avatar JKorf commented on August 13, 2024

Hi, I'm not sure, I tried to quickly reproduce it, but couldn't. I've changed the implementation a bit in version 3.0, could you try again with that implementation?
It might have to do with starting a lot of tasks which makes the await calls slower.

from cryptoexchange.net.

nikkozp avatar nikkozp commented on August 13, 2024

Ok, I'll check it

from cryptoexchange.net.

JKorf avatar JKorf commented on August 13, 2024

Have you had time to see how it performs now?

from cryptoexchange.net.

nikkozp avatar nikkozp commented on August 13, 2024

I think it works pretty well now

from cryptoexchange.net.

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.