mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-21 00:00:13 +02:00
- even less memory for circle tool
- background thread for bookmark initialization: this uses a DNS lookup which may cause long waiting times during startup git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7554 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
6badc5e558
commit
c2c5b12882
|
@ -476,8 +476,17 @@ public final class Switchboard extends serverSwitch {
|
|||
", " + this.userDB.size() + " entries" +
|
||||
", " + ppRamString(userDbFile.length()/1024));
|
||||
|
||||
//Init bookmarks DB
|
||||
initBookmarks();
|
||||
// Init bookmarks DB: needs more time since this does a DNS lookup for each Bookmark.
|
||||
// Can be started concurrently
|
||||
new Thread(){
|
||||
public void run() {
|
||||
try {
|
||||
initBookmarks();
|
||||
} catch (IOException e) {
|
||||
Log.logException(e);
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
|
||||
// define a realtime parsable mimetype list
|
||||
log.logConfig("Parser: Initializing Mime Type deny list");
|
||||
|
|
|
@ -41,7 +41,7 @@ public class CircleTool {
|
|||
|
||||
// read some lines from known circles
|
||||
Set<String> crds = new HashSet<String>();
|
||||
crds.add("0|0");
|
||||
//crds.add("0|0");
|
||||
String co;
|
||||
for (short i = (short) Math.max(0, circles.length - 2); i < circles.length; i++) {
|
||||
for (short j = 0; j < circles[i].length; j = (short) (j + 2)) {
|
||||
|
@ -51,7 +51,7 @@ public class CircleTool {
|
|||
}
|
||||
|
||||
// copy old circles into new array
|
||||
short[][] newCircles = new short[radius + 30][];
|
||||
short[][] newCircles = new short[radius][];
|
||||
System.arraycopy(circles, 0, newCircles, 0, circles.length);
|
||||
|
||||
// compute more lines in new circles
|
||||
|
@ -61,7 +61,7 @@ public class CircleTool {
|
|||
for (short r = (short) circles.length; r < newCircles.length; r++) {
|
||||
r1 = (short) (r + 1);
|
||||
crc = new ArrayList<short[]>();
|
||||
for (short a = 0; a <= 2 * (r + 1); a++) {
|
||||
for (short a = 0; a < 2 * (r + 1); a++) {
|
||||
x = (short) (r1 * Math.cos(Math.PI * a / (4 * r1)));
|
||||
y = (short) (r1 * Math.sin(Math.PI * a / (4 * r1)));
|
||||
co = x + "|" + y;
|
||||
|
|
Loading…
Reference in New Issue
Block a user