These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

C#: Market bulk data slow

First post
Author
SJ Astralana
Syncore
#1 - 2016-09-24 04:37:21 UTC
Re this endpoint: https://crest-tq.eveonline.com/market/10000043/orders/all/?page=1

I have some uncontroversial code shown below, but where 50,000 records in a 5mb payload will load in a browser in under ten seconds, it takes over two minutes. Anyone run into this?


public static string Load(string url)
{
    var req = (HttpWebRequest)WebRequest.Create(url);
    var response = req.GetResponse();
    using (var stream = response.GetResponseStream())
    {
        if (stream == null) return null;
        using (var buffer = new BufferedStream(stream))
        {
            var reader = new StreamReader(buffer);
            return reader.ReadToEnd();
         }
    }
}

Hyperdrive your production business: Eve Production Manager

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2016-09-24 14:42:25 UTC
I've been using python to parse them, and I'm not seeing any real issue. Downloading, parsing, and dumping them _all_ into a file, in 30-120 seconds.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Zifrian
The Frog Pond
Ribbit.
#3 - 2016-09-24 22:34:57 UTC
You might want to check different options to the settings for HttpWebRequest. I noticed it was really slow until I figured maybe it was something with .Net instead of CCP.

Here are some settings that helped me with my CREST calls (in vb.net):

ServicePointManager.DefaultConnectionLimit = 20
ServicePointManager.UseNagleAlgorithm = False
ServicePointManager.Expect100Continue = False

Dim request As HttpWebRequest
request = DirectCast(WebRequest.Create(myUri), HttpWebRequest)

request.Method = "GET"
request.Proxy = nothing
request.PreAuthenticate = True
request.UnsafeAuthenticatedConnectionSharing = True

Hope it helps.

Maximze your Industry Potential! - Download EVE Isk per Hour!

Import CCP's SDE - EVE SDE Database Builder

SJ Astralana
Syncore
#4 - 2016-09-25 01:49:01 UTC
Zifrian wrote:

You might want to check different options to the settings for HttpWebRequest.


Strange, no change...

Hyperdrive your production business: Eve Production Manager

SJ Astralana
Syncore
#5 - 2016-09-25 22:04:13 UTC
Bullseye: req.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;

I looked at the traffic in wireshark and it looked identical, which pointed me to the browser must be receiving less data over the wire.

Hyperdrive your production business: Eve Production Manager