HTTPSocket CPU Utilization 2018R2 vs 2019R1.1

2018R2

Vs 2019R1.1

Notice the orange line which is the utilization of the selected process.

What’s happening is multiple httpsockets access API servers. Many of the API’s have rate limiting so I’m using call later with a 1000 ms delay before making the next request.

I don’t really see how I can make a ‘simplified’ project that will display this issue without giving access to my client’s data (and that isn’t going to happen)

Hmm ?

Isn’t this a known issue of the sockets in 2019r1?

This one: feedback://showreport?report_id=55709 ???

But this is a xojo.net.httpsocket not the urlconnection in that report. Maybe Xojo fixed it by making Windows behave like MacOS?

In the last time we experienced that URLConnection and xojo.net.httpsocket are behaving the same.
If one of them has issues the other one also has them.
At the moment we’re stuck at 2018r3 because of these issues (higher CPU usage, slowdowns, apps are freezing and crashing).

Simply compare the behaviour of this sample project with 2018r3 and 2019r1.1
https://drive.google.com/open?id=1Vao9Umi4A3-W2IskrpSjRfKRZXOaiHHZ

@Wayne Golding
Are these synchronous or asynchronous?

Don’t have a choice with xojo.net.httpsockets, so asynchronous. I’m running 8 sockets in parallel with 4 being single shots (only one request made) and the others making multiple sequential requests with the 1000ms delay between requests using timer.calllater.

Have you tried CURL instead?

No and I don’t believe I should need to. It works ok in 18R2, why would it not in 19R1.1?

I have written a new super using urlconnection which I have tested ok with single requests so maybe I can make this work, but I would like to think that Xojo doesn’t by choice break existing code with these updates.

I’ve split the project into two parts, the download data is now a console app built in 2018R2 and the GUI app is built in 2019R1.1. This adds the ability to download data using a scheduler and uses the reliable CPU cost effective version of the Xojo.Net.HTTPSocket.

@Wayne Golding how much data is being transferred?
And what is the content type?
How much cores does the system have and GHz (total).

A similar problem seems to have been fixed with xojo/net/httpsocket: feedback://showreport?report_id=55301
Perhaps we should check with the last alpha?

For my part, I still use version 2018 because of current httpsocket problems. I think this is the first time I’ve been stuck on an earlier version for so long. I hope that the Xojo team is aware that this is an important issue, httpsocket is used in many projects.

[quote=441873:@Derk Jochems]how much data is being transferred?[/quote] Relatively small ammounts < 1MB

[quote=441873:@Derk Jochems]And what is the content type?[/quote] JSON & XML

[quote=441873:@Derk Jochems]How much cores does the system have and GHz (total).[/quote] 4 cores @ 3.5GHz, but is that relevant given Xojo only uses one core?

[quote=441980:@olivier vidal]Perhaps we should check with the last alpha?[/quote] The next one maybe.

[quote=441986:@Wayne Golding]Relatively small ammounts < 1MB
JSON & XML
4 cores @ 3.5GHz, but is that relevant given Xojo only uses one core?
The next one maybe.[/quote]

I’m seeing this if i re-create the sockets (urlconn and xnet http) fast and do another request fast. Say in a button click it fast.

It looks like somehow the socket is not destroyed instantly. Maybe because it keeps waiting for the request to timeout (exception) before they are actually destroyed?

[quote=441980:@olivier vidal]A similar problem seems to have been fixed with xojo/net/httpsocket: Feedback Case #55301
Perhaps we should check with the last alpha?[/quote]

feedback://showreport?report_id=55301

No more comments can be added to Feedback 55301. It will soon be two months since it has been indicated as fixed and “waiting verification for our testing staff”. This means that this correction is still not incorporated in the last alpha? Please, Xojo team, what about it? We need to move forward on this issue. It’s been almost a year since I’ve been stuck on an old version of Xojo.

[quote=444589:@olivier vidal]feedback://showreport?report_id=55301

No more comments can be added to Feedback 55301. It will soon be two months since it has been indicated as fixed and “waiting verification for our testing staff”. This means that this correction is still not incorporated in the last alpha? Please, Xojo team, what about it? We need to move forward on this issue. It’s been almost a year since I’ve been stuck on an old version of Xojo.[/quote]

Hi Olivier,

I’m not having any issues anymore with the latest alpha so this one should be fixed (verified by me :wink: ).

[quote=444688:@Stefan Adelsberger]
Hi Olivier,

I’m not having any issues anymore with the latest alpha so this one should be fixed (verified by me :wink: ).[/quote]

Great! Thank you Stefan. @Wayne Golding , it was the same bug for you? It’s OK now ?

Still seeing massive CPU usage, but wasn’t expecting any difference as the release notes don’t mention the issue.

I’ve changed the app to use URLConnection instead of the deprecated new api httpsocket. Utilization while still high in comparison to 18R2 is now acceptable for this project.