Skip to content

Instantly share code, notes, and snippets.

View GrigoryPtashko's full-sized avatar

Grigory Ptashko GrigoryPtashko

View GitHub Profile
@GrigoryPtashko
GrigoryPtashko / IntelliJ_IDEA__Perf_Tuning.txt
Created November 17, 2016 08:17 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@GrigoryPtashko
GrigoryPtashko / -Spring-JPA-Dynamic-Query-With-Limit
Created January 11, 2017 10:07 — forked from tcollins/-Spring-JPA-Dynamic-Query-With-Limit
Spring Data JPA - Limit results when using Specifications without an unnecessary count query being executed
If you use the findAll(Specification, Pageable) method, a count query is first executed and then the
data query is executed if the count returns a value greater than the offset.
For what I was doing I did not need pageable, but simply wanted to limit my results. This is easy
to do with static named queries and methodNameMagicGoodness queries, but from my research (googling
for a few hours) I couldn't find a way to do it with dynamic criteria queries using Specifications.
During my search I found two things that helped me to figure out how to just do it myself.
1.) A stackoverflow question.