Update of /cvsroot/sheets/sheets
In directory usw-pr-cvs1:/tmp/cvs-serv30643
Modified Files:
Sheets.sheets
Log Message:
Improved responsiveness of bytecode completion, and incorporated a new, more stable version of Versionable Store - OX.
Database Improvements:
* Fault Tolerence on database crash - If for any reason, a database sync fails (such as your application or computer crashing), it will recover to the last known good commit on restart.
* Insulation from application errors - The database now traps application errors during load and store, to prevent the database from being corrupted during sync.
* Threadsafe syncing - The database now prevents multiple threads from interfering with each other by synchronizing the sync call.
Index: Sheets.sheets
===================================================================
RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Sheets.sheets 13 Nov 2002 18:53:38 -0000 1.17
--- Sheets.sheets 14 Nov 2002 20:58:35 -0000 1.18
***************
*** 5218,5221 ****
--- 5218,5222 ----
import org.browsecode.sheets.archive.*;
import org.browsecode.sheets.graph.*;
+ import java.lang.ref.*;
import java.awt.*;
import java.awt.event.*;
***************
*** 71163,71166 ****
--- 71164,71168 ----
schin:726
schin:727
+ schin:1035
schin:728
schin:729
***************
*** 71187,71190 ****
--- 71189,71193 ----
schin:746
schin:747
+ schin:1036
schin:748
schin:749
***************
*** 78768,78771 ****
--- 78771,78775 ----
schin:726
schin:727
+ schin:1035
schin:728
schin:729
***************
*** 78788,78791 ****
--- 78792,78796 ----
schin:746
schin:747
+ schin:1036
schin:748
schin:749
***************
*** 78812,78819 ****
section text schin:728
public static ByteCodeClass ByteCodeClass.lookup (String fullName) {
JavaClass clazz = Repository.lookupClass(fullName);
if (clazz == null)
return null;
! return new ByteCodeClass(clazz);
}
object schin:729
--- 78817,78830 ----
section text schin:728
public static ByteCodeClass ByteCodeClass.lookup (String fullName) {
+ if (cachedClasses != null && cachedClasses.containsKey(fullName))
+ return (ByteCodeClass)cachedClasses.get(fullName);
JavaClass clazz = Repository.lookupClass(fullName);
if (clazz == null)
return null;
! ByteCodeClass bcc = new ByteCodeClass(clazz);
! if (cachedClasses == null)
! cachedClasses = new HashMap();
! cachedClasses.put(fullName, bcc);
! return bcc;
}
object schin:729
***************
*** 78821,78826 ****
type=java
section text schin:729
! public static ByteCodeClass ByteCodeClass.lookup (String name, java.util.List classes, java.util.List \r
! packages) {
// try the default package
ByteCodeClass result = lookup(name);
--- 78832,78836 ----
type=java
section text schin:729
! public static ByteCodeClass ByteCodeClass.lookup (String name, java.util.List classes, java.util.List packages) {
// try the default package
ByteCodeClass result = lookup(name);
***************
*** 78993,78996 ****
--- 79003,79011 ----
section text schin:748
private ByteCodeMember[] ByteCodeClass.allMembers() {
+ if (memberCache != null) {
+ ByteCodeMember[] result = (ByteCodeMember[])memberCache.get();
+ if (result != null)
+ return result;
+ }
Field[] fields = javaClass.getFields();
Method[] methods = javaClass.getMethods();
***************
*** 79002,79005 ****
--- 79017,79021 ----
result[i + fields.length] = ByteCodeFunction.createMethodOrConstructor(methods[i], this);
}
+ memberCache = new SoftReference(result);
return result;
}
***************
*** 83571,83574 ****
--- 83587,83601 ----
section text schin:1034
JWindow RootFrame.splash;
+ object schin:1035
+ pkg=org.browsecode.javaStuff
+ type=java
+ section text schin:1035
+ // We really want a soft reference cache for this
+ private static HashMap ByteCodeClass.cachedClasses;
+ object schin:1036
+ pkg=org.browsecode.javaStuff
+ type=java
+ section text schin:1036
+ private SoftReference ByteCodeClass.memberCache;
object sjc:1
pkg=org.browsecode.sheets.dicer
***************
*** 107570,107573 ****
--- 107597,107601 ----
schin:726
schin:727
+ schin:1035
schin:728
schin:729
***************
*** 107594,107597 ****
--- 107622,107626 ----
schin:746
schin:747
+ schin:1036
schin:748
schin:749
|