[Q] changing keySize:

Norberto Manzanos nmanzanos at gmail.com
Mon Apr 24 19:39:17 UTC 2006


Hi Chris.
The messageTally is at the end of the message. I tried with only 10
cities, in order to make the list easier to read.

My City objects are of a medium complexity level. But the cities I'm
persisting now have no many things.  They have a collection of names
(most of the cases, just one, until now), and a city code.
They know their country. And each country knows their cities. Though
this double reference problem, I have some objects to avoid recursion
and duplication. I have many double-referenced objects in my model,
and all them has some of this objects, wich are very simple ones (some
symbols v.i). There are other v.i. that have nil values until now.
I think that the double-reference could not be a problem for the
moment, because I'm not changing the depth.
The objects are created in memory.  I'm testing a migration from and
old data base to Magma, but, for some specific reasons my plan is to
upload them from this DB to memory, then persist the objects in Magma,
and throw away the rest.  I'm not worried with time consumed on the
migration. These could be a problem when the application will be
running.
The machine is a Pentium 4 with 512 MB RAM. It's not bad. But my image
is too big. (100Mb) Could be this huge image a problem?

Other topic
Is there any reason for not including this method: ?

MagmaCollectionReader>> union: aCollection
	"Answer the set theoretic union of two collections"

	^ self asSet addAll: aCollection; yourself

I think that if you have #intersection: and #difference:, #union:
might have its place.
I tested it and works fine.

Regards
Norberto


- 78841 tallies, 80737 msec.

**Tree**
95.8% {77346ms} MagmaSession>>commit:
  |95.8% {77346ms} MagmaSession>>commit
  |  95.8% {77346ms} MagmaSession>>commitAndBegin:
  |    54.3% {43840ms} MagmaSession>>newCommitPackageFor:
  |      |37.9% {30599ms} MaTransaction>>changedObjects
  |      |  |37.9% {30599ms} MaTransaction>>addChangesFromReadSet
  |      |  |  37.4% {30196ms} MaTransaction>>didChange:from:
  |      |  |    22.1% {17843ms} MaFixedObjectBuffer>>isDifferent:using:
  |      |  |      |9.5% {7670ms} MaObjectSerializer>>oidFor:
  |      |  |      |  |9.1% {7347ms} MagmaOidManager(MaOidManager)>>oidFor:
  |      |  |      |  |  9.0% {7266ms} MagmaOidManager>>oidFor:ifAbsent:
  |      |  |      |  |    6.3% {5086ms}
MagmaOidManager(MaOidManager)>>oidFor:ifAbsent:
  |      |  |      |  |      3.9% {3149ms}
WeakIdentityKeyDictionary(Dictionary)>>maAt:ifPresent:ifAbsent:
  |      |  |      |  |        3.3% {2664ms}
WeakIdentityKeyDictionary(Dictionary)>>at:ifAbsent:
  |      |  |      |  |          2.7% {2180ms}
WeakIdentityKeyDictionary(Set)>>findElementOrNil:
  |      |  |      |  |            2.5% {2018ms}
WeakIdentityKeyDictionary>>scanFor:
  |      |  |      |5.3% {4279ms}
MaFixedObjectBuffer(MaObjectBuffer)>>maInstVarAt:
  |      |  |      |  3.4% {2745ms}
MaFixedObjectBuffer(MaObjectBuffer)>>uint:at:
  |      |  |      |    3.2% {2584ms} ByteArray>>maUint:at:
  |      |  |      |      2.8% {2261ms} ByteArray>>maUnsigned48At:
  |      |  |    10.3% {8316ms}
MaVariableObjectBuffer(MaVariableBuffer)>>isDifferent:using:
  |      |  |      |9.6% {7751ms} Array>>maIsChangedFrom:using:
  |      |  |      |  8.6% {6943ms} Array(Object)>>maIsChangedFrom:using:
  |      |  |      |    4.4% {3552ms} MaObjectSerializer>>oidFor:
  |      |  |      |      3.7% {2987ms} MagmaOidManager(MaOidManager)>>oidFor:
  |      |  |      |        3.6% {2907ms} MagmaOidManager>>oidFor:ifAbsent:
  |      |  |      |          2.2% {1776ms}
MagmaOidManager(MaOidManager)>>oidFor:ifAbsent:
  |      |  |    4.6% {3714ms} MaTransaction>>useWriteBarrierOn:
  |      |  |      2.4% {1938ms} MagmaPreferences>>allowWriteBarrier
  |      |  |      2.2% {1776ms} Array(Object)>>maAllowsWriteBarrier
  |      |12.9% {10415ms} MaCommitPackage>>serializeObjectsUsing:
  |      |  |12.7% {10254ms} MaObjectSerializer>>serializeGraph:do:
  |      |  |  12.7% {10254ms} MaObjectSerializer>>appendGraph:do:
  |      |  |    11.7% {9446ms} MaObjectSerializer>>append:
  |      |  |      11.2% {9043ms}
MaObjectSerializer>>bufferFor:storageObject:startingAt:
  |      |  |        5.7% {4602ms} MaFixedObjectBuffer>>populateBodyFor:using:
  |      |  |          |5.4% {4360ms} MaObjectSerializer>>oidFor:
  |      |  |          |  5.4% {4360ms} MagmaOidManager(MaOidManager)>>oidFor:
  |      |  |          |    4.1% {3310ms} MagmaOidManager>>oidOf:is:
  |      |  |          |      3.0% {2422ms}
MaWeakValueDictionary(MaDictionary)>>at:put:
  |      |  |          |        2.5% {2018ms}
WeakValueDictionary(Dictionary)>>includesKey:
  |      |  |          |          2.5% {2018ms}
WeakValueDictionary(Dictionary)>>at:ifAbsent:
  |      |  |          |            2.4% {1938ms}
WeakValueDictionary(Set)>>findElementOrNil:
[2.4% {1938ms} WeakValueDictionary(Dictionary)>>scanFor:
  |      |  |        2.6% {2099ms}
MaVariableObjectBuffer>>populateBodyFor:using:
  |      |  |          2.6% {2099ms} Array(Object)>>maStreamVariablyInto:for:
  |      |  |            2.3% {1857ms} MaObjectSerializer>>oidFor:
  |      |  |              2.2% {1776ms} MagmaOidManager(MaOidManager)>>oidFor:
  |      |3.6% {2907ms} MagmaSession>>newCommitPackageFor:
  |      |  3.5% {2826ms} MaCommitPackage>>serializeObjectsUsing:
  |      |    3.4% {2745ms} MaObjectSerializer>>serializeGraph:do:
  |      |      3.4% {2745ms} MaObjectSerializer>>appendGraph:do:
  |      |        2.3% {1857ms} MaObjectSerializer>>append:
  |      |          2.0% {1615ms}
MaObjectSerializer>>bufferFor:storageObject:startingAt:
  |    21.2% {17116ms} MagmaSession>>submit:
  |      |21.2% {17116ms} MaLocalServerLink>>submit:
  |      |  21.2% {17116ms}
MaLocalRequestServer(MaRequestServer)>>processRequest:
  |      |    21.2% {17116ms} MagmaRepositoryController>>value:
  |      |      21.2% {17116ms} MagmaRepositoryController>>processRequest:
  |      |        21.2% {17116ms} MaWriteRequest>>process
  |      |          21.2% {17116ms}
MaObjectRepository>>submitAll:for:beginAnother:
  |      |            20.9% {16874ms} MaObjectRepository>>write:
  |      |              13.0% {10496ms} MaRecoveryManager>>log:flush:
  |      |                |11.3% {9123ms} MaObjectSerializer>>serializeGraph:
  |      |                |  11.3% {9123ms}
MaObjectSerializer>>serializeGraph:do:
  |      |                |    11.3% {9123ms}
MaObjectSerializer>>appendGraph:do:
  |      |                |      9.3% {7509ms} MaObjectSerializer>>append:
  |      |                |        9.0% {7266ms}
MaObjectSerializer>>bufferFor:storageObject:startingAt:
[6.7% {5409ms} MaVariableObjectBuffer>>populateBodyFor:using:
[  6.7% {5409ms} Dictionary>>maStreamVariablyInto:for:
[    6.4% {5167ms} MaObjectSerializer>>oidFor:
[      6.3% {5086ms} MaOidManager>>oidFor:
[        4.8% {3875ms} MaOidManager>>oidOf:is:
[          3.6% {2907ms} MaWeakValueDictionary(MaDictionary)>>at:put:
[            3.3% {2664ms} WeakValueDictionary(Dictionary)>>includesKey:
[              3.3% {2664ms} WeakValueDictionary(Dictionary)>>at:ifAbsent:
[                3.2% {2584ms} WeakValueDictionary(Set)>>findElementOrNil:
[                  3.2% {2584ms} WeakValueDictionary(Dictionary)>>scanFor:
  |      |              6.0% {4844ms} MaObjectRepository>>applyToCache:
  |      |                4.0% {3229ms} MaObjectFiler>>write:index:
  |      |                  2.2% {1776ms} MaObjectFiler>>write:at:
  |      |                    2.1% {1695ms}
MaTransactionalFileStream>>maWrite:bytesFro...:atFilePosition:
  |    20.2% {16309ms} MagmaSession>>processNewAndRemovedIndexesIn:using:
  |      12.7% {10254ms} MagmaSession>>refreshViewUsing:
  |        |12.7% {10254ms} MaCommitResult>>refresh:
  |        |  9.3% {7509ms} MagmaSession>>assignPermanentOidsFrom:
  |        |    |5.7% {4602ms} MaObjectSerializer>>oidOf:is:
  |        |    |  |5.7% {4602ms} MagmaOidManager>>oidOf:is:
  |        |    |  |  5.7% {4602ms} MagmaOidManager(MaOidManager)>>oidOf:is:
  |        |    |  |    3.4% {2745ms}
MagmaOidManager>>removeGarbageCollectedObjectEntries
  |        |    |  |      3.4% {2745ms}
MaWeakValueDictionary(MaDictionary)>>reject:
  |        |    |  |        3.4% {2745ms}
MaWeakValueDictionary(MaDictionary)>>add:
  |        |    |  |          2.3% {1857ms}
MaWeakValueDictionary(MaDictionary)>>removeKey:ifAbsent:
  |        |    |  |            2.2% {1776ms}
WeakValueDictionary(Dictionary)>>removeKey:ifAbsent:
  |        |    |  |              2.2% {1776ms}
WeakValueDictionary(Set)>>findElementOrNil:
  |        |    |  |                2.1% {1695ms}
WeakValueDictionary(Dictionary)>>scanFor:
  |        |    |3.6% {2907ms}
MaObjectSerializer>>objectWithOid:ifFound:ifAbsent:
  |        |    |  3.5% {2826ms}
MagmaOidManager>>objectWithOid:ifFound:ifAbsent:
  |        |    |    3.2% {2584ms}
MaWeakValueDictionary(MaDictionary)>>maAt:ifPresent:ifAbsent:
  |        |    |      3.2% {2584ms}
MaWeakValueDictionary(MaDictionary)>>at:ifAbsent:
  |        |    |        3.1% {2503ms}
WeakValueDictionary(Dictionary)>>at:ifAbsent:
  |        |    |          3.0% {2422ms}
WeakValueDictionary(Set)>>findElementOrNil:
  |        |    |            3.0% {2422ms}
WeakValueDictionary(Dictionary)>>scanFor:
  |        |  3.4% {2745ms} MagmaSession>>recordObjects:
  |      5.9% {4763ms} MagmaCollection>>buildIndexes:ignoring:
  |        5.9% {4763ms} MagmaCollection>>commitDo:
  |          2.0% {1615ms} MagmaCollection>>commitUnlock
  |            2.0% {1615ms} MagmaSession>>commit:
  |              2.0% {1615ms} MagmaSession>>commit
  |                2.0% {1615ms} MagmaSession>>commitAndBegin:
  |                  2.0% {1615ms} MagmaSession>>newCommitPackageFor:
  |                    2.0% {1615ms} MaTransaction>>changedObjects
  |                      2.0% {1615ms} MaTransaction>>addChangesFromReadSet
3.8% {3068ms} MagmaSession>>initializeSerializer
  2.9% {2341ms} MagmaSession>>oidFor:
    2.8% {2261ms} MaObjectSerializer>>oidFor:
      2.8% {2261ms} MagmaOidManager(MaOidManager)>>oidFor:
        2.8% {2261ms} MagmaOidManager>>oidFor:ifAbsent:
          2.5% {2018ms}
WeakIdentityKeyDictionary(Dictionary)>>maAt:ifPresent:ifAbsent:
            2.4% {1938ms} WeakIdentityKeyDictionary(Dictionary)>>at:ifAbsent:
              2.3% {1857ms} WeakIdentityKeyDictionary(Set)>>findElementOrNil:
                2.2% {1776ms} WeakIdentityKeyDictionary>>scanFor:

**Leaves**
14.6% {11788ms} Dictionary>>scanFor:
8.5% {6863ms} WeakIdentityKeyDictionary>>scanFor:
6.7% {5409ms} WeakKeyAssociation>>key
3.5% {2826ms} WeakValueDictionary(Dictionary)>>at:ifAbsent:
2.4% {1938ms} Set>>findElementOrNil:
2.4% {1938ms} Dictionary>>maAt:ifPresent:ifAbsent:
2.3% {1857ms} LargePositiveInteger(Integer)>>+
2.2% {1776ms} IdentitySet>>scanFor:
2.1% {1695ms} MagmaOidManager(MaOidManager)>>oidFor:ifAbsent:
2.0% {1615ms} MaVariableObjectBuffer(MaObjectBuffer)>>maInstVarAt:

**Memory**
	old			+11,548,552 bytes
	young		-162,240 bytes
	used		+11,386,312 bytes
	free		-612,792 bytes

**GCs**
	full			6 totalling 3,593ms (4.0% uptime), avg 599.0ms
	incr		10963 totalling 9,990ms (12.0% uptime), avg 1.0ms
	tenures		173 (avg 63 GCs/tenure)
	root table	0 overflows


More information about the Magma mailing list