I can't change maximum heap size in PhpStorm - phpstorm

Going to PhpStorm settings and try to change memory settings doesn't effect.
Currently I put 4048M, but it still set at 1024M.
In phpstorm64.vmoptions the following settings:
-Xmx4048m

Related

PhpStorm isn't doing code completion with large file

I've just installed this library. PhpStorm does its usual code completion, except for the \XeroAPI\XeroPHP\Api\AccountingApi class. The \XeroAPI\XeroPHP\Api\IdentityApi class in the same folder works just fine.
The file is quite big - 2,560KB. If I delete roughly half of the 65,000 lines from the class (and it works whether it's the first half or the second half) then I get my code completion back. In fact, I can delete just the last 3,000 or so lines (getting the file down to 2,499KB) and it works.
I've also tried a quick regex find/replace to remove all the #throws PHPDoc comments. This got the file down to 2,491KB and hey presto, code completion works fine.
If I had to make a guess I'd say it's not doing code completion with source files over 2.5MB or something, but I can't find any setting for this.
Any way to get code completion going with this file short of deleting stuff from it (which will be restored next time I do a Composer update anyway)?
Based on your info (especially the mentioned file size and the fact that it starts to work after reducing it) you have hit a limit of max file size that IDE is willing to parse and index.
Solution: configure idea.max.intellisense.filesize option using Help | Edit Custom Properties command. By default it has a value of 2500 (size in KB). Set it to 3000 or so (to cover your file size) and restart IDE (it reads and applies settings from idea.properties file on start only).
idea.max.intellisense.filesize=3000
P.S. Do not put that value too big as it may cause other performance issues.

Set default Zoom Window font size in Access 2016 query designer?

Does anyone know if there's a way to set the default font size for the Access 2016 Query Zoom window?
I often use the Zoom window when editing lengthy/complex expressions. I can set the zoom window font size but it only "sticks" for the current session. Next time I start Access, it's back to Tahoma 8pt.
I have no issue with the "Query Design Font" (File → Options → Object Designers → Query Design Font) as it [properly] stays where I set it (Sergoe UI 11) between sessions, but the Zoom window seems to insist upon a smaller font than the query designer.
Maybe I'm missing something but I couldn't find anything applicable online, nor in/around registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Access
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Access
It's a minor issue but years of frustration with it is starting to add up! Surely there's a setting somewhere so I don't have to change it every time I use Access... Any ideas? Thanks!
[I'm running Access 2016 (local install Version 1711 via Office 365 ProPlus subscription) on Windows 7 Home Premium SP1 64-bit.]
The Zoom box is part of (Office installation path)\ACCWIZ\UTILITY.ACCDA. You can open this file and see the form ZoomForm, but you can't edit it.
Note that the Zoom box is not restricted (or specific) to the query designer - you can use Shift+F2 wherever you can edit (or see) a value.
With help from https://access-programmers.co.uk/forums/showthread.php?t=238660 and https://bytes.com/topic/access/answers/739912-change-default-font-zoom-box :
Set a reference to UTILITY.ACCDA.
In your startup code (called from an AutoExec macro), call this function:
Public Function ZoomBoxSetParams()
' adapt to your preferences
utility.zoom_stFontName = "Consolas"
utility.zoom_iFontSize = 16
End Function
It is not necessary to overwrite the Shift+F2 action with an AutoKeys macro as proposed in the linked threads. You only need to set these variables, and the Zoom box will always use this font.
Note:
This is mainly useful for your development computer. If any of your users use a different version of Access, or the runtime version, the reference to UTILITY.ACCDA will break.
If you are in this situation, you will either have to remove the reference and code before distribution, or perhaps set the reference at runtime if UTILITY.ACCDA is available.
Edit:
An alternative Zoom box is here: http://www.accessmvp.com/TomVanStiphout/ZoomBox.htm
(I haven't tried it)

How do I configure fpp (Facebook Path Picker) to open new tabs in macvim using a vimer alias?

I believe that I need to set the $FPP_EDITOR environment variable to be able to change the default editor that fpp would invoke when opening files.
I have aliased mvim to vimer -t with alias mvim="vimer -t". This means that the mvim command should open new files in the currently available (operating system level) macvim window, and even if a sequence of files is included, it should open them in new tabs in that (operating system level) window. So if I already have an instance of macvim running and I try to pass in 4 files, I now have one window with 5 tabs in it.
But when I try to use mvim as the editor (with export FPP_EDITOR="mvim"), it opens the files in new macvim (operating system level) window, in separate (vim buffer level) windows in a single tab. So if I already have an instance of macvim running and I try to pass in 4 files, I now have two macvim "instances" running in separate OS-level windows, one with 1 tab with 1 buffer-level window, and one with 1 tab with 4 buffer-level windows.
It seems like FPP must be doing more than just passing in files in a sequence as a suffix to the $FPP_EDITOR command. I'm not sure what that is, nor exactly how to figure it out.
This is an answer to the question (technically) that I figured out as I was writing out the question.
But, it's missing all the right extra info about what was going wrong, so I'm going to this as an answer, but will happily accept another answer that can do more than just answer the question per se, but can give some background info about why the aliasing only sorta works.
The key though (if you just want a solution) is to use
export FPP_EDITOR="vimer -t"
and this performs as desired. For some reason it does not seem that setting the environment variable to a command that is aliased uses the aliased command, if it has an available original meaning (which mvim does).

dynamically changing the values of database system variables set in an option file

In MySQL SET syntax page it says following: "To make a global system variable setting permanent, you should set it in an option file". Does this mean that I will not be able to dynamically change the values of variables set in the option file? (I want to change them iteratively via some script).
No, it simply means you are setting a global default value that will survive restarts of the service. The SET command will still override any defaults in the scope specified (global, session, etc.).
If you are using SET GLOBALs, you have probably already overridden option file defaults.

JTextPane editor large file & performance

I'm using a JTextPane to edit XML files. A jflex parser split xml file in tokens and using a custom document (extends
DefaultStyledDocument) i color syntax:
doc.setCharacterAttributes(token.getCharBegin() + change,
token.getCharEnd() - token.getCharBegin(),
Token_Styles_Define.getStyle(token.getDescription()), true);
My problem is to load and edit large xml file, for exemple a 400kb xml file takes 30 seconds and for 700kb 1Mb i get java heap space.
I google it and i found :
" Define a limit that JTextPane/JEditorPane can handle well (like 500KB or 1MB). You'll only need to load a chunk of the file into the control with this size.
Start by loading the 1st partition of the file.
Then you need to interact with the scroll container and see if it has reached the end/beginning of the current chunk of the file. If so, show a nice waiting cursor and load the previous/next chunk to memory and into the text control.
The loading chunk is calculated from your current cursor position in the file (offset).
loading chunk = offset - limit/2 to offset + limit/2
The text on the JTextPane/JEditorPane must not change when loading chunks or else the user feels like is in another position of the file.
This is not a trivial solution but if you don't find any other 3rd party control to do this I would go this way. " (bruno conde)
Is this a good solution and can anybody give me an exemple (link tutorial project) ? or are any other solution?
How can we improve jtextpane performance?
Thx
A megabyte of text in a JTextPane should not be an issue. On my desktop, adding a 1MB string with setText() takes ~1.6 seconds, but once loaded there is no noticeable lag.
Try is disabling the syntax highlighting. That is the most likely source of the delay.