CUPS AirPrint slow, repeated Get-Printer-Attributes queries - cups

Overview: I'm setting up AirPrint operation under Linux. It works, but there are severe performance issues and I'm looking for ideas on debugging. I've searched for similar posts but found none that helped.
Environment: Linux kernel v3.14
CUPS version: 1.5.4
Avahi version: 0.6.31
Problem: When I print anything from an iPad (iOS 5 or iOS 11) on the printer, the iPad shows "Contacting Printer..." for almost 10 seconds before briefly saying "Preparing..." and then going ahead to print the actual job. I realized that if I select the document to print, select Print to see the print preview, and wait for about 10 seconds, the print preview finally resizes and changes, and if I then press Print it doesn't say "Contacting Printer..." any more. Basically, during those 10 seconds it's sending multiple Get-Printer-Attributes queries to the printer (looking through the CUPS log) with 5 seconds between each query.
Any ideas would be welcome!!

Interestingly this behaviour goes away if you enable IPv6 on the machine running CUPS/Avahi. And I've tested that to be true on a completely isolated router, so there shouldn't be traffic issues on IPv4 vs IPv6.

Related

5 seconds delay(pause) from django+apache

I am running a site with django+apache+ssl+mysql+cloudfron+s3.
However, I discovered that the ttfb time increases significantly when the first connection and caching setup time ends at some point.
(response starts after pause for about 5 seconds)
After uninstalling Apache, I tried debugging in debug mode and in Gunicorn.
There were no issues with ttfb in debug mode. However, I found out that I had the same problem when using Gunicorn.
So I looked all over apache, db, ssl, django template rendering, etc.
I don't know what's causing the bottleneck.
Which part should I look at more?
Oh, and I also found that if I send a request twice in a row, I get a response right away without any pause.
Please advise. I think my head is going to break...
edit : I tested it without any cdn or database page, but the result was the same.

Google Colab Pro+ freezes after clo

I got a Colab Pro+ because I wanted to use the background execution option.
I enabled the background execution and GPU type and started my code.
My code is a simple CNN on Tiny ImageNet, which requires several hours of training on a GPU.
I closed the browser, and after one-two hours, I returned, and everything was frozen!
How can I resolve this issue?
This happens to me as well and the best solution I've been able to come up with (which works inconsistently, but seems to help a lot more that otherwise) is to prevent my screen from locking. Let me explain.
I run Colab Pro+ on a Macbook laptop, and the battery-saving settings are ordinarily such that the screen locks when the laptop is idle for 5 mins, the lockscreen comes up. I noticed that for some reason Colab was much more likely to freeze and disconnect if I was away from the laptop than if I were working on it for hours as it ran, so to superficially mimic this, I changed my settings to never lock the screen. And I then I realized that with these settings Colab would freeze and disconnect much less frequently, and I could successfully let it run overnight and check it in the morning. [Edit: let me clarify that I have not tried this while closing the browser. So I can attest to the efficacy of my method if you leave the browser open].
I have to say though, that it's been bad for my laptop and it's unacceptable that this is necessary despite what we pay for Colab Pro+. Their product simply does not work as advertised and we have no recourse. If anyone has discovered a better solution (that works) I'm all ears.
An alternative that works for me is to make the navigator click with some interval. You can add the following script to the console. It works well with Colab Pro and Pro+ but remember that, if you use the free account, Colab will disconnect you after some hours.
To open the console press F12 or ctrl/command+shift+i.
function Clicking(){
console.log("Clicking");
document.querySelector("colab-connect-button").click()
}
setInterval(Clicking,50000)

Performance tab showing very shallow stack

When I run the chrome performance tool, most of the time I get a very shallow stack shown. So it's impossible to debug anything.
It doesn't happen on my work machine but does on my home machine (also on a friends machine with the same config):
Windows 10 Pro - Version 10.0.18362 Build 18362
CPU ryzen 7 3700x
Chrome Version 78.0.3904.108 / Beta / Canary
Sometimes if I use CPU throttling it shows the proper stack but the vast majority of times it does not. Am I missing a feature toggle somewhere?
Is someone else running into this?
Thank you.
Larger screenshot:
Try using chrome stable version.
Canary is simply a much newer release that's not as well tested. I have debugged this page in my chrome (version: 78) over 10 times with 6*CPU throttling. I got stack over 10,000 ms all times.
You can get more information about performance tab in this official link.

Meteor: Random 100% CPU usage at the browser

I'm using Mac OS Yosemite with Google Chrome. Sometimes, for some random unknown reason, Chrome takes over 1 core at 100%. When I kill the process, I notice that It killed the tab in which the Meteor app was loaded. Sometimes it takes over my 4 cpu cores.
I'm using the development mode and, at least I think, I'm not doing anything to trigger it. This behaviour seems random and very hard to reproduce. I don't if it's Chrome or Meteor that cause this random behaviour.
Did someone already experienced this?

Adobe Air app stucks after being in background (or inactive) to much time

We have an air application (native for windows) that after being unused or background for about some hours after you try to use it it got stuck and "not responding" windows message.
No log or error or crash just got stuck.
The best behaviour that we have got is that after some seconds it unstucks but then stucks and unstucks every 30 seconds aprox, so it is anusable.
We have tried some "ugly" tricks like after being out of focus/background for some minutes, goes into front, it goes, but this haven't resolved the above problems.
I understand clearly, that SO (Windows) has removed the cached memory pages associated to this process, however, this is normal for each program, so, it is normal that program (specially visually heavy like ours) come back to use, it takes some seconds to go into memory again.
However after that time of re caching into memory any programs (most) works like a charm.
This is not the case of air app.
is there any trick or recommendation for fixing this?
Maybe we should combine the "to front" trick with some other "dumb processing" to keep the program in memory?
thanks in advance.