Why do some websites take longer to load when clicking "view source"? - google-chrome-devtools

I'm trying to figure out how the sublime text community package list works over at http://wbond.net/sublime_packages/community
The page itself displays after about a second and seems fine to use. You can inspect element too, and that also works fine, the dev tools window opens up straight away.
But if you click "view source", it takes absolutely ages for the source code to display. I've tried this on lots of different browsers. Why is this?

The slowness is caused by the syntax highlighter. Chrome's view-source: attempts to highlight the whole file at once, which takes some time on a 1.5MB file.
Press Shift + Esc to show Chrome's Task Manager, and you will see that the CPU shoots up on "view source". If you wait a little longer, the "Page(s) Unresponsive" dialog will show up (as shown below).
This bug has been reported before at https://code.google.com/p/chromium/issues/detail?id=128293

The page is extremely large. It has a total size of 1,5MB so the source viewers have some troubles loading that.
There are about 35000 lines of source code in there, a pretty hefty HTML file I would say :)

Related

Is there a vscode plugin able to display same file in two columns sequentially?

Now, when we split editor in vscode. It will give us a copy of opening file.
Is there is a plugin which makes second window display rest of opening file.
Means, second window display opening file sequentially so that we can view long code better.
when first file scroll down, the snippets in the second window will scroll down following the first one.
best
The plugin name: under scroll.
Everyone can find it in market place.
Plus: why always some disgusting comments like "buy a 4k monitor" ...............

go to definition in vscode preview window ruins the edito

This annoying window when you go to definition is impossible to disable and has been a blemish on an otherwise first rate code editor.
For some reason it picks up .d.ts files and I get the window even when there is only one definiton. I would love to remove this feature but it does not seem possible.
Below is a screen shot of it picking up a definition and for some reason a react index.d.ts file. So annoying, I can never go to the definition, I've got to click about until the preview window decides it wants to close:
What finally cured it for me was:
"editor.gotoLocation.multiple": "goto"

How to attach images to github issues without dragndrop?

Is there a way to attach images to github issues without drag'n'drop, copy-pasting images or jumping through various hoops - just by using a file picker?
I find drag'n'drop very inconvenient, and copy-paste does not work in Firefox (on top of being rather inconvenient as well).
Github help page only mentions drag'n'drop, or copy-paste for Chrome.
The question here on adding images lists additional methods like creating a custom repository or wiki.
All of that is enough of a pain in the ass for me to ask a question here, hoping for a hidden way to use normal file picker.
There is a file picker. Simply click on the Attach files by dragging & dropping, selecting them, or pasting from the clipboard field.
Yes there is, its very simple, but not intuitive.
Consider this example where you want to comment:
Just click the highligted section with the text "Attach files by dragging and dropping, selecting them, ...".
Then a file dialog will open up:

Copy text of error msg from circled-X in Eclipse source editor

I'm trying to fix literally hundreds of XML validation errors in a Java webapp using Eclipse. Researching them with Google has been excruciatingly painful, because up to now, this has been my workflow:
Open Google in a browser.
Click in the Eclipse editor tab where the error (shown as an icon at the start of the line that's a red circle with a white "X") is located, mouseover, and try to memorize a chunk of it.
Click on the search form in the browser, and attempt to replicate the chunk from memory.
Repeat steps 2-3 until the text in the search form matches the text Eclipse ephemerally displays on the screen. Usually, something like:
"cvc-complex-type.2.4.d: Invalid content was found starting with element 'description' No Child element is expected at this point."
(that's just one error out of thousands, shown for illustration. I copied it from memory in 5 or 6 chunks)
At the moment, it's blowing my mind that there doesn't appear to be any easy way in Eclipse to do something like right-click the error icon & choose "copy error description"... or at least display it in some way that will survive giving another window the input focus so I can read it while typing it into the search form.
I know there has to be a better way to do this.
I suspect the error descriptions are present somewhere on the "Problems" tab, but I literally have almost 10,000 Errors & Warnings there, and no obvious way I'm aware of to sort or filter them. Is there maybe some keyboard modifier + mouse action that will allow me to click the red/white X icon and have Eclipse take me directly to the error on the Problems tab?
Good question, and I feel for you, there is a slightly easier way. I'm running Eclipse Kepler but I suspect this will work for you too.
Roll your mouse cursor over the problem x icon in the editor gutter (if you're showing line numbers it will be in that area), wait till the tool tip displays the error message, then quickly move your cursor over the tool tip and click within the text, then you can select all (Ctrl + a) and copy (Ctrl + c), then paste wherever the error description.

Why is IntelliJ using autocomplete in a plain text file and how do I turn it off?

In trying to edit a 2300+ line .ini file Intellij is really slow, as in 1-2 seconds after keystroke before the letter appears. I see autocomplete popping up and I assume that's why its slow, but its a plain text file, why is it even giving me autocomplete?
And ok, its only registered as plain text because I haven't figured out how to get it to support hierarchical config files nicely, and autocomplete could be useful here, but it shouldn't be that slow.
Have you tried clicking the police icon in the right lower corner? Setting the "Highlighting Level" to None it speeds up most things when working with large files of any kind.