git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1d14ffa
)
Performance tweaks
author
Kevin Lamonte
<kevin.lamonte@gmail.com>
Wed, 8 Mar 2017 16:54:11 +0000
(11:54 -0500)
committer
Kevin Lamonte
<kevin.lamonte@gmail.com>
Wed, 8 Mar 2017 16:54:11 +0000
(11:54 -0500)
src/jexer/TApplication.java
patch
|
blob
|
blame
|
history
src/jexer/bits/Cell.java
patch
|
blob
|
blame
|
history
src/jexer/bits/CellAttributes.java
patch
|
blob
|
blame
|
history
src/jexer/io/SwingScreen.java
patch
|
blob
|
blame
|
history
diff --git
a/src/jexer/TApplication.java
b/src/jexer/TApplication.java
index e9a7a44c62ddb4c9cd53b17a3ca7eee35e8985b8..0a2ab19548f7a1706b3dec7656803bd7c478fb57 100644
(file)
--- a/
src/jexer/TApplication.java
+++ b/
src/jexer/TApplication.java
@@
-772,6
+772,9
@@
public class TApplication implements Runnable {
// wait until either the backend or the consumer threads have
// something to do.
try {
// wait until either the backend or the consumer threads have
// something to do.
try {
+ if (debugThreads) {
+ System.err.println("sleep " + timeout + " millis");
+ }
synchronized (this) {
this.wait(timeout);
}
synchronized (this) {
this.wait(timeout);
}
diff --git
a/src/jexer/bits/Cell.java
b/src/jexer/bits/Cell.java
index d4d78ba3ab25b4446eaed222796a055e7fd82a94..957ac7656f8c5e2fb34324ef792b5d97e943c42b 100644
(file)
--- a/
src/jexer/bits/Cell.java
+++ b/
src/jexer/bits/Cell.java
@@
-101,8
+101,11
@@
public final class Cell extends CellAttributes {
}
Cell that = (Cell) rhs;
}
Cell that = (Cell) rhs;
- return (super.equals(rhs)
- && (ch == that.ch));
+
+ if (ch == that.ch) {
+ return super.equals(rhs);
+ }
+ return false;
}
/**
}
/**
diff --git
a/src/jexer/bits/CellAttributes.java
b/src/jexer/bits/CellAttributes.java
index e889e89250c14dcb608bb7fa35132fc89d6b0c1f..43e0b222c751f616e7edf99554a6c63707df59ec 100644
(file)
--- a/
src/jexer/bits/CellAttributes.java
+++ b/
src/jexer/bits/CellAttributes.java
@@
-231,13
+231,13
@@
public class CellAttributes {
}
CellAttributes that = (CellAttributes) rhs;
}
CellAttributes that = (CellAttributes) rhs;
- return ((bold == that.bold)
- && (blink == that.blink)
+ return ((foreColor == that.foreColor)
+ && (backColor == that.backColor)
+ && (bold == that.bold)
&& (reverse == that.reverse)
&& (underline == that.underline)
&& (reverse == that.reverse)
&& (underline == that.underline)
- && (protect == that.protect)
- && (foreColor == that.foreColor)
- && (backColor == that.backColor));
+ && (blink == that.blink)
+ && (protect == that.protect));
}
/**
}
/**
diff --git
a/src/jexer/io/SwingScreen.java
b/src/jexer/io/SwingScreen.java
index 24710101ee5b1fb44ebe25ee126390e523ccb244..4a602b3c272742e20de3ac02cdf9d00f8282379e 100644
(file)
--- a/
src/jexer/io/SwingScreen.java
+++ b/
src/jexer/io/SwingScreen.java
@@
-451,10
+451,12
@@
public final class SwingScreen extends Screen {
// Prevent updates to the screen's data from the TApplication
// threads.
synchronized (screen) {
// Prevent updates to the screen's data from the TApplication
// threads.
synchronized (screen) {
+
/*
System.err.printf("bounds %s X %d %d Y %d %d\n",
bounds, xCellMin, xCellMax, yCellMin, yCellMax);
*/
/*
System.err.printf("bounds %s X %d %d Y %d %d\n",
bounds, xCellMin, xCellMax, yCellMin, yCellMax);
*/
+ Cell lCellColor = new Cell();
for (int y = yCellMin; y < yCellMax; y++) {
for (int x = xCellMin; x < xCellMax; x++) {
for (int y = yCellMin; y < yCellMax; y++) {
for (int x = xCellMin; x < xCellMax; x++) {
@@
-469,7
+471,6
@@
public final class SwingScreen extends Screen {
|| lCell.isBlink()
|| reallyCleared) {
|| lCell.isBlink()
|| reallyCleared) {
- Cell lCellColor = new Cell();
lCellColor.setTo(lCell);
// Check for reverse
lCellColor.setTo(lCell);
// Check for reverse