man shows blank screen / long time to load - performance

A weird thing has happened to my "man" command, typing man causes man to load, but incredibly slow. As in, it first displays a new blank line, then clears the screen, then stays blank for a few minutes, finally showing up the requested information.
At first I thought it was just hanging up, so I kept Ctrl-C'ing it for a few days, then decided to fix the problem and waited for it to do something.
Once a man page has showed up, further calls to the same page are normal. Newly requested man pages do the same thing.
Googling this up just shows marketing crap / ads.
Some sort of corrupted cache being rebuilt on-demand?
Anyone has noticed similar behaviour on man?

The rebuild on-demand (on a very busy system) seems like a likely explanation. If it's easily reproducible, then I would do this in the window where you are going to execute man:
tty
In another window execute this script:
while [ 1 ]; do
clear
date
ps -ft ttyvalfromotherwindow
sleep 5
done
In yet another window, do this:
top
Together you'll probably figure out what is going on.

Related

Waiting for content loading in Appium

I read manuals, but I'm confused yet, when it's necessary to use wait method in Appium. So, what I have to implement (on Ruby):
When app starts, it shows Sign in activity. I enter log in data there and click Sign in button.
App goes to another activity. First, empty screen is shown with circular progressbar, then loaded data is shown.
I want to tap on this screen in specified place.
My code is:
textfield(1).send_key('login')
textfield(2).send_key('password')
button(1).click
Appium::TouchAction.new.tap(x: 0.5, y: 0.5).perform
In arc it works perfectly, but when it's running in tests I have a problem on step two: it seems tap is executed on empty screen, when data is not loaded yet. So, how can I tell to test that it's necessary to wait some time?
I am not familiar with ruby,
In python we use this after line of code to wait for specified time you can give 5,10,15,20 in seconds as required.
self.driver.implicitly_wait(10)

Visual Studio 2010 multi-screen layout keeps resetting

I started a new job a few weeks ago.
In my previous job, I was working with 2 screens. I know have 3 screens here (what an upgrade!)
I have always been bothered by a small bug, and since today I don't have a lot of code to do, I decided to finally try to solve this problem. The layout I want to achieve is pretty simple (see screenshots below): One file on the left screen, and another one on the right.
What happens is the following:
When I enter debug mode, the layout stays the same except one thing... the separation between two files (which is usually right between the two screens). Annoying for breakpoints and stuff, so I resize it, debug, and...
When I leave debug mode and go back to debug, the layout go back to what it was... except the separation which moved as well!
And last but not least, if I close Visual Studio and open it again, my two file views are now expanded on both screens, separated horizontally (<- this one is new, I had never seen that before).
Every time I go to debug mode, or go back to design, I would resize it to fit my two screens. And then it would shift again at the next debug. After some time it shifts with a smaller amount of pixels. Then, it just stops shifting, as if it learned that it shouldn't change. Until at some point, it goes back to normal and forces me to resize again.
I tried to use add-ons such as Perspectives or Layout O Rama , but they didn't keep any information about the two Code windows. No matter how I was saving them (let's say, one would be 20% of the left screen, and the other would expand on 2 screens), it would ANYWAY go back to the strange, shifted layout.
I also tried Visual Studio Productivity Power Tool and it's terrible. If I dock a code tab as a Window on my second screen, and dock for example the Find Results on it, it would be separated or reorganized every time I switch to Debug/Design
Has anyone experienced that yet? Am I the only one feeling that my Visual Studio is a pet who will learn how to do his own layout as time goes?
Thank you!
Also, as an image is always better than a description, here are a few screenshots:
Here, the normal, regular layout, with the red line being where my screens stop. Perfect, al dente layout allowing me to use the best of my two screens
Here, the one happening every time I go to debug. Notice how ONLY the code windows shifted (the bottom part with error list on the left and find results on the right didn't change at all )
And this is the one I get when I restart my IDE, forcing me to recreate my layout all the time
Thanks a lot!

In chrome, why does DOMContentLoaded appear to take longer than the request/response itself?

As you can see, the actual length of the request and its subsequent response is very quick. You cant see it in this view, but the blue bar represents a transaction that took 9 milliseconds.
The two lines, red and blue (which completed nearly instantaneously and are thus very close to each other), pictured far to the right of that, show up around 51ms.
So, what is happening here? is this actually time being spent? or is it just how the browser records it?
Your request took 9 milliseconds to complete
After that your browser received some data, it converted this into an html object(DOM) and displays this on your screen(DOMLoaded)
The action of converting and displaying took your browser 42 milliseconds, which is the gap between response and domLoaded.
edit:
I didn't manage to find the exact things the browser does but when i look into the dom of an empty page (which takes 100ms on my browser btw) i can find things like local storage, screen resolution, geo location and history.
Besides that i can imagine that cookie and add-ins can also take up some time if they are hooked. My ghostery for example is ment to block trackers so i assume he does so before the page is fully loaded.
I wish i could have given you a list of things the browser does in that window but alas. Maybe someone else can provide an actual list.

FF issue with hovering on anchor rotator

Ok so this bug is very weird
here is my code, you can actually see this bug happening using fiddler
http://jsfiddle.net/LLMUX/13/
the code works fine as long as you don't go to a different tab. the code is a rotator. if you hover the links it will show the block the hover is assigned, then once you hover off it will resume the main rotation
produce the bug
- have the fiddler page open, you could copy the code into a file and try it, same thing happens
- with the fiddler page you can hover or whatever you want or do nothing
- open another tab, do whatever for a few seconds 5-10 should do
- go back to the fiddler page
- chances are you will see 2 blocks showing then eventually 1 goes away
this only happens if you are coming back from a different tab, if you stay on the page this will NEVER happen. I tried is safari, it did not happen I tried it on IE9 it did not happen! I tried this on FF 7 and 8, both with this problem.
If anyone have any idea on why this happens it would be greatly appreciated
Edit - might not happen 100% of the time
I bet your problem is the same as this: Jquery setInterval too fast when coming from another tab
Browsers try to minimize the performance hit of web pages being active when the user doesn't interact with them. One such optimization is setTimeout/setInterval "clamping": Firefox 5+ doesn't fire timeouts faster than once in 1s.
I see that your code only uses a 1300ms interval, but I guess jQuery's animation deals with being in background in a different way than your setInterval-based code does, but I'm not up to debugging this to know the exact reason it works like that.
See also Background Tab Animation and jQuery
(edit) and if I'm right, the way I'd try fixing it is to stop using setInterval to drive animation and instead to always use the jQuery's 'finished' callbacks to schedule the next slide via setTimeout: fadeIn --> wait 1s --> fade out --> fade in.

How to design a good "progress panel"

For tasks that will take more than a few seconds, a good user interface, in my opinion, should provide a progress bar along with appropriate information on the progress of the operation. (Microsoft kindly provide User Interface Guidelines on this topic, but I want a status panel that is a bit more advanced.)
The "task" class I am using is able to log messages, and if the messages are important enough (warning or error), I would like to display them on the progress panel. It would also be nice with a graphical indication when warnings or errors have occured (a warning or error icon perhaps). If there are many such messages, a text box, a list view or perhaps some report control could be appropriate here.
There could be a cancel button while the task is running, and after the task has been completed, a "View log" button would also be nice.
To summarise, I have a good idea how to implement my status panel, but I would really like some input on this. Did I miss something important? Am I going overboard on this? Are there perhaps any components like this already available out there?
For logging, you should probably actually have another higher level of error. These are the levels I usually implement (as swiped from DEC back in the 80's).
DEBUG - a very low-prioity message that the developer just put in to help diagnose what's going on in the event something goes awry.
INFORMATIONAL - No problem, just reporting progress the user might be interested in.
WARNING - Something that could possibly be an issue in some situations, but may also be just fine.
ERROR - A definite problem. The user must be informed, but the program will try to keep going.
FATAL - A problem so bad that the program can't go on.
The second is, since you are calling this a "progress panel", I assume you are planning on implementing some kind of progress bar. There has actually been a fair bit of research into progress bars. The main thing is that, whatever you do, don't let the bar get slower as it progresses. That makes it seem to drag on forever.
Lastly, it sounds like you are considering some sort of status message line. If you are looking for some good status messages, I suggest you use some of these. :-)
You have here a similar Status Panel specifications which can give you some ideas on what could be included into this kind of GUI:
In sort, define your goals and scope of this Status Panel before listing the design details.
Note: with too much options on it, you will evolve it into a "Control Panel" ;-)
You'll want to view log messages while in progress, not just at the end. If a bug occurs, it'll often be before the task is done, and the UI thinks everything is still chugging along. It can be really annoying to find this is happening, and yet the only visible log message (without going to some external file somewhere) is some random informational message far removed from the actual problem.
(I don't know whether you're already doing this, as it's not clear from your question. If you are, hats off.)
I think it's important that your main progress bar fill up exactly once, and there is always indication of progress.
I've just recently done something very similar at work. The tasks were long, with many subtasks. The interface I ended up with was a double progress bar, which were actually the first and last of a stack of progress bars.
The API is something like
StartNewTask(Caption,NumberOfSubtasks)
EndTask
SetProgress(Caption,NumberOfSubtasksFinished)
StartNewTask pushes a new bar on the stack, and EndTask pops one.
SetProgress sets the progress of the most-recently-pushed progress bar, and ripples up the changes to parent bars. For example:
StartNewTask('Doing 2 things',2)
SetProgress('Done 1 now',1)
StartNewTask('Big Subtask',40)
...
SetProgress('Done some subtasks',10)
Now, there are 2 progress bars shown, the second at 25% (10/40) and the first at 62.5% (1/2 + 10/40*2)
Like I said above, if you've got >2 tasks in the stack, I only show the first and last (first gives overall progress and never goes backwards, second gives indication of current activity)
You could extend this by giving a weighting to each subtask, i.e.
StartNewTask(Caption,[ListOfSubTaskWeightings])
To make the top progress bar smoother.
Additionally, developers can show all progress bars to see why it takes ages, and I think you could make decent logs out of it.

Resources