How could I improve WebStorm performance on MacOS? - frontend

I'm using WebStorm on MacOS Mojave. However my laptop usually spends twice or even more time than my colleague's laptop when exactly the same project is compiled. I try to modify WebStorm's VM options like enable bigger memory size.
# custom WebStorm VM options
-Xms1024m
-Xmx2048m
-XX:ReservedCodeCacheSize=512m
Unfortunately it doesn't have an outstanding effect.
How could I improve WebStorm performance on MacOS?

Make sure you aren't indexing your dist or www folders.
Right click the folder -> "Mark Directory As" -> "Excluded".

Related

nvm with WSL for projects stored in Windows

I'm struggling to understand how exactly WSL works.
The training that I'm doing requires nvm so I can manage my node versions in my project, located in my hard drive that is running with Windows.
So, in order to use nvm I need WSL, but I cannot comprehend where it is located. As far as I understood (and I'm pretty sure that I'm wrong) the WSL that I installed is like a Linux VM, completely independent from my Windows, and I operate it through the Ubuntu Terminal that came with WSL. If that's the case, how can nvm in WSL be useful if my project is in my Windows directory and the WSL controls node versions from my Linux VM?
How do I make nvm useful for my project running from my C:\ drive and how does WSL work with nvm in my Windows?
Thank you!
A few options, but each has advantages and disadvantages:
If your Node/JavaScript files are on your Windows C:\ drive, then you do have the ability to access that from WSL. Windows paths are automatically mounted and accessible in WSL via /mnt/c, /mnt/d, etc.
So if you have your JS source in, for example:
C:\Users\<myusername>\Documents\Projects\JS_class\project1\
Then that would be accessible under Ubuntu in WSL via:
/mnt/Users/<myusername>/Documents/Projects/JS_class/project1/
The disadvantage here is performance, as mentioned in this question.
Alternatively, you can store your project files inside WSL. You can access the WSL path from Windows by using \\wsl$\Ubuntu\home\<yourusername>\ (or similar). You can use this to copy from your existing Windows drive to your WSL distribution.
Advantage: Faster. Disadvantage: Unknown -- You seem to want the files to be in Windows, but I'm not sure why.
Or you can use WSL1 for most Node/JS tasks. See the previously mentioned answer for details on how to convert.
Advantage: Speed
Disadvantage: WSL1 hasn't been updated in a while, and is started to run into some compatibility issues. It's still popular enough and stable enough at the moment for me to continue to recommend it, though.
There's also a Windows version of nvm as well as a replacement project that the repo there mentions. I cannot personally speak for the quality of it, but it does have 23k stars on Github. Note that it is not affiliated with the original (Linux-based) nvm project.

.exe and .msi installers does not runs on Windows 10 OS

I was trying to install Node.js node-v14.15.1-x64 on PC with Windows 10 Pro 64-bit OS, but then I found that the problem appears with any .exe and .msi
If I'm trying to run installer with/without administrator, I got only endless blue loading circle icon on my screen without any error report or process in Task manager:
Hanged icon with cursor arrow does not disappears, even if I will wait for a hour, to stop it, I've to restart computer
I've followed Stein Åsmul answer, which I'm forced keep unmarked, because it seems like nothing helps yet:
I've re-download installation media but now I see that this happens happens to all installers.
I've tried turn off Windows Defender Firewall and Security Antivirus.
with C:\WINDOWS\system32>sfc /scannow Windows Resource Protection did not find any integrity violations.
HKEY_CLASSES_ROOT/.exe value is exefile, and exefile folder value is Application, I have tried to change it with "%1"%*
in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion in ProgrmFilesDir value is C:\Program Files and in ProgramFiles Dir (x86) is C:\Program Files (x86)
With attempt to C:\WINDOWS\system32>assoc .exe=exefile something also went wrong here, because OS freeze, and I was forced to reboot
C:\WINDOWS\system32>msiexec.exe /i :\Users\User\Desktop\New folder (1)\pycharm-community-2020.2.3.exe /L*v C:\Your.log opens Windows Installers, which describes Display, Install, Restart and Logging Options, but I'm not sure, how to use it, to find out with this issue
Solution:
After removing AVScanner.ini form C:\ directory problem disappeared and installation works fine
Also I have to note, that I will mark answer by Stein Åsmul because I found it useful in similar possible situation, even if it was not solution in this particular case
Any advice, guide or example would be helpful
Overall: Do you have a screenshot? That almost sounds like a Windows Smartscreen issue?
Here are some generic setup.exe debugging suggestions:
Shortened setup.exe problem list
Long setup.exe problem list.
Specific Suggestions: 1) Re-download the installation media first of all. 2) Then reboot and disable anti-virus scanners and try to install. 3) You should also enable logging and look at the log for clues. 4) Try to install as a different admin users. 5) Finally test on a virtual or another machine to verify the integrity of the setup file.
Quick Logging:
msiexec.exe /i C:\Path\Your.msi /L*v C:\Your.log
General WiX and setup links (section: "Generic Tricks? - Consumer issues")
Smartscreen issues
Node.js - Cannot Install it is showing an error because of .msi

Eclipse crashes in elementaryOS

Everytime I try to run eclipse, my system crashes. That happens when it appears the window that asks me to select the workspace. I've installed JDK and Maven, and downloaded Eclipse from the official website
It's a bug in the SWT porting on GTK3. There is no real solution, but there is a workaround by forcing Eclipse to use GTK2.
I assume your Eclipse folder is /opt/eclipse and that you don't have write permissions in this folder. Please change the commands, if your set-up differs.
There are two ways to apply this workaround, a long and explanatory way, and a short one for the lazy ;)
Modifying eclipse.ini by hand
You need to open eclipse.ini in your Eclipse folder:
sudo -i scratch-text-editor /opt/eclipse/eclipse.ini
and add the following lines:
--launcher.GTK_version
2
It's important to add these lines before --launcher.appendVmargs, otherwise Eclipse will crash.
for more reference, plz check
https://elementaryos.stackexchange.com/questions/1276/eclipse-mars-freezes-after-splash-screen
I was having this problem (Eclipse freeze, crash, with elementary OS Freya).
My Eclipse installation was done using the installer, so my path was different to what Prade jo indicates, but his solution was right on.
sudo scratch-text-editor
Browse to home -> yourUserName -> eclipse -> java-mars (or whichever version you have) -> eclipse -> eclipse.ini
The line before "--launcher.appendVmargs", add:
--launcher.GTK_version
2
Should now be good to go.
I had the same issue with Oxygen and Elementary Loki. Changing to GTK2 worked for me.
Try running eclipse from the terminal to see the problem. Most likely it is an X server problem.

Shared folder between Windows host and Ubuntu guest, long filenames

I'm setting up an Ubuntu guest under Windows using VirtualBox for a colleague to provide him with a Linux-based development environment for a node.js application.
This colleague of mine can't or doesn't want to SSH into the VM and work in emacs or vim; he's a Sublime Text guy. So I have set up the project tree in a VirtualBox shared folder so he can access it from Windows (to edit) and the Linux VM (to build/test).
Unfortunately, npm install fails with file system errors. The problem seems to be extremely long path names resulting from deeply nested node_modules dependencies. I'm guessing we're hitting a Windows limit on filename length. The npm install works just fine in a regular (non-shared) directory in the VM.
Does anyone have ideas about how to deal with this problem? One idea I had was to somehow alias or link $MY_PROJECT/node_modules to another, non-shared location, but I can't figure out how to do that.
Update: I'm going to try this hack: https://www.virtualbox.org/ticket/11976.
Update 2: Ended up using samba, which is probably what I should have done in the first place.
One option is to use one of the multiple ways for sublime to edit remote files over ssh, covered in some detail here
How to use Sublime over SSH
Another is try using the native windows version of node and have your colleague develop locally directly under windows.

Unable to install iis manager on windows 8.1

I get an error while trying to install IIS manager from "Turn on off windows features" on a windows 8 machine. Just before trying to install this I install Visual Studio community online and rebooted my machine. Visual Studio works fine.
I also made sure all updates are installed on my machine and also rebooted and tried installing IIS manager.
The error that I get is "The function attempted to use a name that is reserved for use by another transaction"
Thanks
Ranjith
Try to turn off your antivirus before install IIS.
I had the same problem and spent hours trying to find out the root cause. Tried to disable anti virus and other options as discussed in forums on the internet.
Here is how i resolved the problem.
Open up msconfig -> go to boot tab -> select Safe boot (Minimal) -> Apply -> Okay
Your machine should restart in safe mode and you should be able to successfully install IIS from the "Turn Windows Feature On/Off" section as described by others.
After the installation is complete, run msconfig again to unselected Safe boot so that you log in to the normal desktop environment on restart. Enjoy!
Just now i also faced that problem and this is how fixed the problem.
The reason can be another server which running on your pc, is using the same port as IIS. (e.g: 80 or 8080).
According to my solution, I started the wampserver. then click on wamp icon on the task bar. then opened the httpd.conf file from Apache.
find (ctrl+F) the "Listen 80" and replace it to "Listen 8080" or any other. save it.
restart your pc and try to install the IIS manager again.
hope it will works!! Good luck.

Resources