You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Magistrello A. (SFA) <mag...@TE...> - 2002-08-28 17:57:19
|
> Hi > > i define an index with MSText domain, when an object is stored the text is > splitted in words which are stored in the indextree. > > My suggestion is to change the orderedCollection in words for a set and in > wordsDo: use the words message as folows: > > -------------------------------------------------------------------------- > ------------- > > 'From Squeak3.2 of 11 July 2002 [latest update: #4951] on 27 August 2002 > at 10:52 pm'! > > !MSText methodsFor: 'as yet unclassified' stamp: 'asm 8/27/2002 01:21'! > words > "Answer a collection of words found in this text" > > | stream word coll | > coll := Set new. > textString isNil ifTrue: [ ^coll ]. > stream := ReadStream on: textString. > [ (word := FlavorCompatibility nextWordOf: stream) isNil ] > whileFalse: [ coll add: word ]. > ^coll > ! ! > > !MSText methodsFor: 'as yet unclassified' stamp: 'asm 8/27/2002 01:23'! > wordsDo: aOneArgumentBlock > "For each word in my string execute aOneArgumentBlock" > > self words do: [:word | aOneArgumentBlock value: word]. > ! ! > > -------------------------------------------------------------------------- > ------------- > > I do my tests with the following: > > | db | > db := MinneStoreDB newOn: (FlavorCompatibility > defaultPath,'SourceCode'). > db supportMultipleUsers. > > (db addObjectSetNamed: #MSMethodsExample) > storesClass: MSMethodsExample; > indexOn: #class domain: String; > indexOn: #selector domain: Integer; > indexOn: #sourceCode domain: MSText. > > db save. > db := MinneStoreDB openOn: (FlavorCompatibility > defaultPath,'SourceCode'). > > | col | > MessageTally spyOn:[ > col := OrderedCollection new. > MinneStoreDB selectors do: [:sel | col add:( MSMethodsExample > class:(MinneStoreDB name) > selector:sel > code:((MinneStoreDB sourceMethodAt:sel) asString))]. > db storeAll: col.] > > it gives me: > > - 1005 tallies, 18370 msec. > > Changing the methos words and wordsDo: > - 925 tallies, 16780 msec. > > > <<MinneStore Test.1.cs>> > > Comments ? > > Best regards > Alejandro Magistrello |