5 I really want to split the constant pool now before I continue since it will
6 get far more involved when I move on more. I also want to take care of a
7 single combined and merged constant pool that is shared for every single
8 class in a JAR perhaps even a global constant pool shared among everything.
9 I do know that it could very heavily reduce the massive number of duplicates
10 for every class. Although I am not too sure how much space reduction would
11 occur. But I do know that for example there is `Object` which is pretty much
12 used everywhere and it is `java/lang/Object` which is 16 bytes just for the
13 characters alone. So pretty much if there are 1000 classes then all of those
14 will take up 16,000 bytes which is quite a bunch. There are also descriptors
15 which are duplicated as well. So I really really want to do a size reduction.
16 But while I add the global pool, I will also put in the split constant so I
17 do not have to resize the classes again.
21 Will note that a SQC I have is 14,298,679 bytes. Okay so I think the first
22 thing to do is to make the split static and runtime pool. Because then both
23 will be used accordingly as needed. I think it would be easier to do the
24 global pools following it. Of course I can still have the old constant
25 pool in there for compatibility purposes.
29 Okay so, going to eat first and exercise. I do start new job tomorrow so I
30 am excited, hoping I can finish the constant pool merging today as I think
31 that might help in reducing the size of the ROM file with less duplicated
32 data. But first it will be naturally the splitting. But since I do plan on
33 having a global constant pool I can modify the code and put in new classes
34 in a way where that is handled properly. Of course this will mean that
35 the constant pool builder becomes an interface. Then I can either deposit
36 entries into the static pool or the run-time pool. Also the run-time pool
37 will be more efficient at load time because less entries will be handled
38 and this automatically means less memory used! So this will increase
39 the efficiency all around. It probably will not happen but I am hoping
40 that at least a single megabyte is cut off. Since when I do the size
41 reductions, I tend to overestimate the difference so here I would say just
42 a megabyte will be reduced. Since I am not too sure how much duplicated
47 Okay, I ate and relaxed a bit so now to work on this. Really am hoping this
48 reduces the ROM enough to where it can fit on Palm OS and DOS more.
52 Okay so first step is to split part of `MinimizedPoolBuilder` into a base
53 class which just acts like the basic pool with just parts and values. Then
54 I can have a split pool implemented on top of that for the class-time and