forked from Qortal/qortal
made modifications to prevent double-setting the same priorities. Kept any/all hard-coded changes from Alpha for anything that didn't already have a setting created by Kenny. Essentially this is a merger of the two repos from Alpha and Kenny, keeping the changes that are relevant from each, while also keeping the thread priority settings in settings.json.
This will give us the best of both worlds (in theory), and dramatically improved overall network performance.
This commit is contained in:
parent
209920b2f8
commit
a0c7e3d94e
@ -132,7 +132,6 @@ public class Synchronizer extends Thread {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Thread.currentThread().setName("Synchronizer");
|
Thread.currentThread().setName("Synchronizer");
|
||||||
Thread.currentThread().setPriority(MAX_PRIORITY);
|
|
||||||
|
|
||||||
if (Settings.getInstance().isLite()) {
|
if (Settings.getInstance().isLite()) {
|
||||||
// Lite nodes don't need to sync
|
// Lite nodes don't need to sync
|
||||||
|
@ -20,7 +20,6 @@ public class AtStatesPruner implements Runnable {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Thread.currentThread().setName("AT States pruner");
|
Thread.currentThread().setName("AT States pruner");
|
||||||
Thread.currentThread().setPriority(MIN_PRIORITY);
|
|
||||||
|
|
||||||
if (Settings.getInstance().isLite()) {
|
if (Settings.getInstance().isLite()) {
|
||||||
// Nothing to prune in lite mode
|
// Nothing to prune in lite mode
|
||||||
|
@ -20,7 +20,6 @@ public class AtStatesTrimmer implements Runnable {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Thread.currentThread().setName("AT States trimmer");
|
Thread.currentThread().setName("AT States trimmer");
|
||||||
Thread.currentThread().setPriority(MIN_PRIORITY);
|
|
||||||
|
|
||||||
if (Settings.getInstance().isLite()) {
|
if (Settings.getInstance().isLite()) {
|
||||||
// Nothing to trim in lite mode
|
// Nothing to trim in lite mode
|
||||||
|
@ -25,7 +25,6 @@ public class BlockArchiver implements Runnable {
|
|||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
Thread.currentThread().setName("Block archiver");
|
Thread.currentThread().setName("Block archiver");
|
||||||
Thread.currentThread().setPriority(NORM_PRIORITY);
|
|
||||||
|
|
||||||
if (!Settings.getInstance().isArchiveEnabled() || Settings.getInstance().isLite()) {
|
if (!Settings.getInstance().isArchiveEnabled() || Settings.getInstance().isLite()) {
|
||||||
return;
|
return;
|
||||||
|
@ -20,7 +20,6 @@ public class BlockPruner implements Runnable {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Thread.currentThread().setName("Block pruner");
|
Thread.currentThread().setName("Block pruner");
|
||||||
Thread.currentThread().setPriority(NORM_PRIORITY);
|
|
||||||
|
|
||||||
if (Settings.getInstance().isLite()) {
|
if (Settings.getInstance().isLite()) {
|
||||||
// Nothing to prune in lite mode
|
// Nothing to prune in lite mode
|
||||||
|
@ -22,7 +22,6 @@ public class OnlineAccountsSignaturesTrimmer implements Runnable {
|
|||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
Thread.currentThread().setName("Online Accounts trimmer");
|
Thread.currentThread().setName("Online Accounts trimmer");
|
||||||
Thread.currentThread().setPriority(NORM_PRIORITY);
|
|
||||||
|
|
||||||
if (Settings.getInstance().isLite()) {
|
if (Settings.getInstance().isLite()) {
|
||||||
// Nothing to trim in lite mode
|
// Nothing to trim in lite mode
|
||||||
|
Loading…
Reference in New Issue
Block a user