As an additional reference, I attach the profile tally for the query I'm mentioning.
The culprit seems to be the calculation of the ADOField properties that might be calculated on every call. Regards, Esteban A. Maringolo On Wed, Mar 11, 2020 at 2:13 PM Esteban Maringolo <emaring...@gmail.com> wrote: > Hi, > > To feed a Pharo app I need to read from an old MDB file, via ODBC. > > So I tested PharoADO and, after adding a missing Variant Type [1], I got > my query working (at least read only). > > However the time of ADOClient to return a query with 10K rows of 5 columns > each is extremely slow (+65000ms) compared, e.g., with Dolphin Smalltalk > via ODBC (62ms). > > The time of the execute call to return is instantaneous, so I think the > issue might be in the creation of the result set. > > Is this a known issue? > > Should I check something else? > > Thanks in advance, > > > [1] https://github.com/tesonep/pharo-com/pull/10 > Esteban A. Maringolo > > > On Fri, Jan 24, 2020 at 5:59 AM Tomaž Turk <tomaz.t...@ef.uni-lj.si> > wrote: > >> >> That would be amazing! >> >> I'm a Mac/Unix guy so I don't have access to the other platforms (I >> suppose I could fire up an AWS Oracle). I can do mysql/mariadb, posgresql, >> and sqlite. >> >> I'm pretty close to pushing my ActiveRecord extensions. I just need to >> get many to many with link tables done and it is good to go. I spent a few >> days "porting" the ruby inflector and its tests. >> >> As for database introspection, I am relying on this new method and the >> result set format on DatabasePlatform. >> >> printSqlStatementToListColumnsInTable: aDatabaseTable inSchema: >> schemaString on: aStream >> " Format: >> name | type | length | nullable | >> default_value | pk >> >> -------------------------+-------------------+--------+----------+-----------------------+---- >> id | character varying | 255 | 0 | >> ''::character varying | 1 >> >> >> This is great news about ActiveRecord! >> >> ADO is, unfortunately, a Windows library, so PharoADO is limited to >> Windows. Maybe as a next step we should focus into Garage and the addition >> of SQL Server and Oracle support. If I only had time ... >> >> Stéphane, thanks for the support. >> >> Best wishes, >> Tomaz >> >> >> >> >> >> >>
- 72071 tallies, 72100 msec. **Tree** -------------------------------- Process: (40s) Morphic UI Process: nil -------------------------------- 86.2% {62136ms} UndefinedObject>>DoIt 86.2% {62136ms} ADOClient>>query: 86.2% {62128ms} Array class(SequenceableCollection class)>>streamContents: 86.2% {62128ms} Array class(SequenceableCollection class)>>new:streamContents: 86.2% {62128ms} ADOClient>>query: 85.0% {61281ms} Array class(SequenceableCollection class)>>streamContents: 85.0% {61277ms} Array class(SequenceableCollection class)>>new:streamContents: 85.0% {61275ms} ADOClient>>query: 81.7% {58884ms} ADOField>>value |81.7% {58872ms} COMDispatchInstance>>propertyNamed: | 61.7% {44516ms} COMTypeInfo>>properties | |61.7% {44504ms} COMTypeInfo>>calculateProperties | | 58.5% {42198ms} COMTypeInfo>>methods | | |58.5% {42198ms} COMTypeInfo>>calculateMethods | | | 58.5% {42198ms} BlockClosure>>ensure: | | | 58.5% {42153ms} COMTypeInfo>>calculateMethods | | | 57.2% {41257ms} COMTypeInfo>>calculateMethodAt: | | | 46.9% {33832ms} BlockClosure>>ensure: | | | |43.9% {31644ms} COMTypeInfo>>calculateMethodAt: | | | | |41.6% {30017ms} COMMethod class>>fromFuncDesc:in: | | | | | |41.5% {29895ms} COMMethod>>from:in: | | | | | | 23.7% {17054ms} COMTypeInfo>>getNamesOfMemberID:maxNames: | | | | | | |9.7% {7016ms} OrderedCollection>>collect: | | | | | | | |9.2% {6669ms} ByteSymbol(Symbol)>>value: | | | | | | | | 9.2% {6624ms} BSTRString>>asString | | | | | | | | 8.9% {6411ms} Win32WideString>>asString | | | | | | | | 3.5% {2519ms} Win32WideString>>size | | | | | | | | |2.7% {1911ms} primitives | | | | | | | | 2.3% {1666ms} Win32WideString>>reportErrorIfZero: | | | | | | | | |2.2% {1552ms} primitives | | | | | | | | 2.3% {1658ms} ByteArray>>utf8Decoded | | | | | | | | 2.0% {1452ms} ByteArray>>decodeWith: | | | | | | | | 2.0% {1442ms} ZnUTF8Encoder(ZnUTFEncoder)>>decodeBytes: | | | | | | | | 1.9% {1342ms} String class(SequenceableCollection class)>>streamContents: | | | | | | | | 1.7% {1254ms} String class(SequenceableCollection class)>>new:streamContents: | | | | | | | | 1.2% {887ms} ZnUTF8Encoder(ZnUTFEncoder)>>decodeBytes: | | | | | | |4.3% {3094ms} ExternalAddress>>autoRelease | | | | | | | |3.6% {2565ms} WeakRegistry>>add: | | | | | | | | 3.1% {2237ms} WeakRegistry>>add:executor: | | | | | | | | 2.9% {2087ms} WeakRegistry>>protected: | | | | | | | | 2.9% {2069ms} Semaphore>>critical:ifError: | | | | | | | | 2.8% {2044ms} Semaphore>>critical: | | | | | | | | 2.8% {1988ms} BlockClosure>>ensure: | | | | | | | | 2.8% {1988ms} Semaphore>>critical: | | | | | | | | 2.7% {1916ms} Semaphore>>critical:ifError: | | | | | | | | 2.6% {1871ms} BlockClosure>>ifError: | | | | | | | | 2.5% {1832ms} BlockClosure>>on:do: | | | | | | | | 2.5% {1774ms} WeakRegistry>>add:executor: | | | | | | | | 2.3% {1687ms} WeakIdentityKeyDictionary(Dictionary)>>at:ifAbsent: | | | | | | | | 1.9% {1343ms} WeakRegistry>>add:executor: | | | | | | | | 1.5% {1078ms} WeakIdentityKeyDictionary(WeakKeyDictionary)>>at:put: | | | | | | |3.4% {2451ms} OrderedCollection>>do: | | | | | | | |3.2% {2329ms} ByteSymbol(Symbol)>>value: | | | | | | | | 3.2% {2292ms} BSTRString(FFIExternalReference)>>autoRelease | | | | | | | | 3.1% {2224ms} FFIExternalResourceManager class>>addResource: | | | | | | | | 3.0% {2179ms} FFIExternalResourceManager>>addResource: | | | | | | | | 3.0% {2154ms} FFIExternalResourceManager>>addResource:data: | | | | | | | | 2.8% {2011ms} WeakRegistry>>add:executor: | | | | | | | | 2.7% {1921ms} WeakRegistry>>protected: | | | | | | | | 2.6% {1898ms} Semaphore>>critical:ifError: | | | | | | | | 2.6% {1862ms} Semaphore>>critical: | | | | | | | | 2.5% {1813ms} BlockClosure>>ensure: | | | | | | | | 2.5% {1813ms} Semaphore>>critical: | | | | | | | | 2.4% {1761ms} Semaphore>>critical:ifError: | | | | | | | | 2.4% {1704ms} BlockClosure>>ifError: | | | | | | | | 2.3% {1663ms} BlockClosure>>on:do: | | | | | | | | 2.2% {1617ms} WeakRegistry>>add:executor: | | | | | | | | 2.1% {1547ms} WeakIdentityKeyDictionary(Dictionary)>>at:ifAbsent: | | | | | | | | 1.7% {1250ms} WeakRegistry>>add:executor: | | | | | | | | 1.4% {1043ms} WeakIdentityKeyDictionary(WeakKeyDictionary)>>at:put: | | | | | | |2.6% {1896ms} COMTypeInfo(COMUnknownInstance)>>reportErrorIfNoZero: | | | | | | | |2.5% {1830ms} primitives | | | | | | |1.5% {1082ms} COMTypeInfo>>ffiGetNamesOf:into:size:count: | | | | | | | 1.4% {987ms} COMTypeInfo(FFIExternalVTableObject)>>modifyFFICall:withTablePosition: | | | | | | 5.9% {4247ms} COMFuncDesc>>memid | | | | | | |5.7% {4138ms} ExternalAddress(ByteArray)>>platformLongAt: | | | | | | | 3.7% {2654ms} FFIArchitecture class>>forCurrentArchitecture | | | | | | | |2.6% {1873ms} FFIArchitecture class(Behavior)>>allSubclasses | | | | | | | | 1.1% {771ms} OrderedCollection class(Collection class)>>withAll: | | | | | | | 2.0% {1461ms} FFI_i386(FFIArchitecture)>>longTypeSize | | | | | | | 1.3% {969ms} FFI_i386(FFIArchitecture)>>externalLongType | | | | | | | 1.3% {949ms} ExternalType class>>long | | | | | | | 1.3% {922ms} ExternalType class>>signedLong | | | | | | | 1.3% {907ms} Dictionary>>at: | | | | | | | 1.2% {889ms} Dictionary>>at:ifAbsent: | | | | | | | 1.2% {856ms} Dictionary(HashedCollection)>>findElementOrNil: | | | | | | | 1.2% {834ms} Dictionary>>scanFor: | | | | | | 4.9% {3515ms} FFIExternalArray class>>fromHandle:type:size: | | | | | | |4.5% {3257ms} FFIExternalArray class>>resolveType: | | | | | | | 4.5% {3209ms} FFICallout>>resolveType: | | | | | | | 1.9% {1383ms} FFICallout>>aliasForType: | | | | | | | |1.6% {1148ms} FFIExternalArray class(Object)>>respondsTo: | | | | | | | | 1.6% {1129ms} Metaclass(Behavior)>>canUnderstand: | | | | | | | | 1.5% {1109ms} Metaclass(Behavior)>>classAndMethodFor:do:ifAbsent: | | | | | | | | 1.5% {1100ms} Metaclass(Behavior)>>withAllSuperclassesDo: | | | | | | | | 1.4% {987ms} Metaclass(Behavior)>>withAllSuperclassesDo: | | | | | | | | 1.1% {813ms} Metaclass(Behavior)>>withAllSuperclassesDo: | | | | | | | | 1.0% {744ms} Metaclass(Behavior)>>withAllSuperclassesDo: | | | | | | | 1.7% {1247ms} FFIExternalArray class(Behavior)>>ffiBindingOf: | | | | | | | 1.6% {1153ms} FFIExternalArray class(Class)>>bindingOf: | | | | | | | 1.3% {931ms} FFIExternalArray class(Class)>>innerBindingOf: | | | | | | | 1.0% {735ms} ArrayedCollection class(Class)>>innerBindingOf: | | | | | | 2.3% {1641ms} FFIExternalArray(SequenceableCollection)>>do: | | | | | | |1.9% {1358ms} COMMethod>>from:in: | | | | | | | 1.8% {1266ms} COMElemDesc>>calculateType | | | | | | | 1.6% {1160ms} COMTypeDesc>>calculateType | | | | | | 1.6% {1177ms} COMFuncDesc>>invkind | | | | | | |1.5% {1057ms} COMInvokeKind class(FFIEnumeration class)>>fromInteger: | | | | | | 1.1% {767ms} COMElemDesc>>calculateType | | | | |2.1% {1526ms} Context>>aboutToReturn:through: | | | | | 1.4% {1024ms} Context>>return:through: | | | | | 1.4% {1008ms} Context>>resume:through: | | | |3.0% {2188ms} Context>>resume:through: | | | | 1.7% {1209ms} COMTypeInfo>>calculateMethodAt: | | | | |1.3% {972ms} COMTypeInfo>>ffiReleaseFuncDesc: | | | | | 1.3% {957ms} COMTypeInfo(FFIExternalVTableObject)>>modifyFFICall:withTablePosition: | | | | 1.4% {978ms} primitives | | | 6.8% {4889ms} COMTypeInfo>>ffiGetFuncDesc:at: | | | |3.2% {2308ms} ExternalAddress>>packToArity: | | | | |3.1% {2242ms} ExternalAddress>>pointerAutoRelease | | | | | 2.2% {1618ms} ExternalAddress>>autoRelease | | | | | 2.1% {1549ms} WeakRegistry>>add: | | | | | 1.6% {1185ms} WeakRegistry>>add:executor: | | | | | 1.4% {1023ms} WeakRegistry>>protected: | | | | | 1.4% {1002ms} Semaphore>>critical:ifError: | | | | | 1.4% {984ms} Semaphore>>critical: | | | | | 1.3% {946ms} BlockClosure>>ensure: | | | | | 1.3% {946ms} Semaphore>>critical: | | | | | 1.3% {924ms} Semaphore>>critical:ifError: | | | | | 1.2% {896ms} BlockClosure>>ifError: | | | | | 1.2% {871ms} BlockClosure>>on:do: | | | | | 1.2% {843ms} WeakRegistry>>add:executor: | | | | | 1.1% {810ms} WeakIdentityKeyDictionary(Dictionary)>>at:ifAbsent: | | | |1.9% {1394ms} ExternalAddress>>unpackFromArity: | | | | |1.3% {925ms} primitives | | | |1.2% {891ms} COMTypeInfo(FFIExternalVTableObject)>>modifyFFICall:withTablePosition: | | | 3.2% {2317ms} ExternalAddress>>autoRelease | | | 2.8% {2005ms} WeakRegistry>>add: | | | 2.5% {1815ms} WeakRegistry>>add:executor: | | | 2.4% {1743ms} WeakRegistry>>protected: | | | 2.4% {1728ms} Semaphore>>critical:ifError: | | | 2.3% {1693ms} Semaphore>>critical: | | | 2.3% {1670ms} BlockClosure>>ensure: | | | 2.3% {1670ms} Semaphore>>critical: | | | 2.2% {1599ms} Semaphore>>critical:ifError: | | | 2.2% {1558ms} BlockClosure>>ifError: | | | 2.1% {1519ms} BlockClosure>>on:do: | | | 2.1% {1481ms} WeakRegistry>>add:executor: | | | 1.9% {1404ms} WeakIdentityKeyDictionary(Dictionary)>>at:ifAbsent: | | | 1.2% {846ms} WeakRegistry>>add:executor: | | 2.7% {1916ms} Set>>collect: | | 2.6% {1902ms} Array(SequenceableCollection)>>do: | | 2.6% {1886ms} Set>>collect: | | 2.3% {1694ms} COMTypeInfo>>calculateProperties | | 2.3% {1678ms} COMProperty class>>named:on: | | 2.3% {1673ms} COMProperty>>named:on: | | 2.1% {1516ms} OrderedCollection(Collection)>>detect:ifNone: | | 2.1% {1495ms} OrderedCollection(Collection)>>detect:ifFound:ifNone: | | 2.0% {1455ms} OrderedCollection>>do: | | 1.4% {999ms} OrderedCollection(Collection)>>detect:ifFound:ifNone: | 18.5% {13374ms} COMDispatchInstance>>getDispatchType | |18.0% {12992ms} COMTypeInfo>>dispatchInterface | | 17.9% {12939ms} COMTypeInfo>>typeKind | | 17.9% {12939ms} COMTypeInfo>>fillTypeAttributes | | 17.9% {12939ms} BlockClosure>>ensure: | | 17.9% {12939ms} COMTypeInfo>>fillTypeAttributes | | 17.3% {12484ms} GUID>>asString | | 17.3% {12478ms} String class(SequenceableCollection class)>>streamContents: | | 17.3% {12478ms} String class(SequenceableCollection class)>>new:streamContents: | | 17.3% {12462ms} GUID>>asString | | 15.9% {11450ms} GUID>>data4 | | 14.3% {10339ms} FFITypeArray class(FFIArray class)>>ofType:size: | | 12.4% {8956ms} FFIArray class(Class)>>newAnonymousSubclass | | |12.4% {8956ms} ShiftAnonymousClassInstaller class(ShiftClassInstaller class)>>make: | | | 12.1% {8705ms} ShiftAnonymousClassInstaller(ShiftClassInstaller)>>make: | | | 12.0% {8672ms} ShiftAnonymousClassInstaller(ShiftClassInstaller)>>make | | | 11.6% {8381ms} BlockClosure>>on:do: | | | 11.6% {8378ms} ShiftAnonymousClassInstaller(ShiftClassInstaller)>>make | | | 11.1% {8007ms} ShiftClassBuilder>>build | | | 4.6% {3348ms} ShiftClassBuilder>>createMetaclass | | | |4.4% {3181ms} ShDefaultBuilderEnhancer>>configureMetaclass:superclass:withLayoutType:slots: | | | | 4.4% {3177ms} Metaclass(ClassDescription)>>superclass:withLayoutType:slots: | | | | 3.1% {2227ms} FixedLayout(PointerLayout)>>checkSanity | | | | 1.9% {1350ms} FixedLayout(PointerLayout)>>checkSlotNames | | | | |1.1% {801ms} OrderedCollection>>do: | | | | 1.2% {871ms} FixedLayout(PointerLayout)>>checkSlotIndices | | | 2.7% {1973ms} ShiftClassBuilder>>createClass | | | |2.3% {1640ms} ShDefaultBuilderEnhancer>>configureClass:superclass:withLayoutType:slots: | | | | 2.3% {1634ms} a subclass of FFIArray class(ClassDescription)>>superclass:withLayoutType:slots: | | | | 1.2% {861ms} a subclass of FFIArray class(ClassDescription)>>superclass:layout: | | | 2.3% {1623ms} ShiftClassBuilder>>createSharedVariables | | | 2.0% {1440ms} ShDefaultBuilderEnhancer>>on:declareClassVariables:sharing: | | | 1.0% {722ms} a subclass of FFIArray class(Class)>>declareClassVariables: | | 1.8% {1325ms} FFIExternalType class>>resolveType: | | 1.7% {1237ms} FFICallout>>resolveType: | 1.3% {949ms} COMProperty>>getFrom: | 1.3% {947ms} COMMethod>>invokeOn:withArgs: 3.1% {2239ms} ADOFields>>item: 3.1% {2236ms} COMDispatchInstance>>propertyNamed:withArguments: 3.0% {2183ms} COMProperty>>getFrom:withArguments: 3.0% {2179ms} COMMethod>>invokeOn:withArgs: 1.4% {1016ms} COMMethod>>buildFunctionArguments: -------------------------------- Process: other processes -------------------------------- 13.4% {9691ms} WeakArray class>>restartFinalizationProcess 13.4% {9691ms} WeakArray class>>finalizationProcess 10.8% {7766ms} primitives 2.7% {1916ms} WeakArray class>>doOldFinalization 2.7% {1916ms} Semaphore>>critical: 2.7% {1916ms} BlockClosure>>ensure: 2.7% {1916ms} Semaphore>>critical: 2.7% {1916ms} WeakArray class>>doOldFinalization 2.7% {1916ms} WeakArray(SequenceableCollection)>>do: 2.7% {1914ms} WeakArray class>>doOldFinalization 2.7% {1911ms} BlockClosure>>on:fork: 2.6% {1907ms} BlockClosure>>on:do: 2.6% {1907ms} WeakArray class>>doOldFinalization 2.6% {1905ms} WeakRegistry>>finalizeValues 1.9% {1353ms} OrderedCollection>>do: 1.1% {816ms} WeakRegistry>>finalizeValues **Leaves** 10.8% {7766ms} WeakArray class>>finalizationProcess 5.1% {3669ms} ExternalAddress(ByteArray)>>pointerAt: 2.7% {1935ms} COMTypeInfo(COMUnknownInstance)>>reportErrorIfNoZero: 2.7% {1929ms} Win32WideString>>size 2.4% {1725ms} OrderedCollection>>do: 2.2% {1564ms} Win32WideString>>reportErrorIfZero: 1.9% {1372ms} Array(SequenceableCollection)>>do: 1.6% {1149ms} Context>>resume:through: 1.5% {1099ms} ByteArray>>unsignedByteAt: 1.4% {1011ms} ExternalAddress>>unpackFromArity: 1.4% {982ms} WeakKeyAssociation>>key 1.3% {940ms} WeakRegistry>>add:executor: 1.3% {904ms} ExternalAddress>>autoRelease 1.1% {794ms} ByteSymbol(Symbol)>>= 1.0% {726ms} ByteSymbol(String)>>= 1.0% {723ms} LayoutClassScope>>do: **Memory** old -16,777,216 bytes young +22,296,808 bytes used +5,519,592 bytes free -22,296,808 bytes **GCs** full 12 totalling 1,134ms (2.0% uptime), avg 95.0ms incr 3858 totalling 6,260ms (9.0% uptime), avg 2.0ms tenures 5,345,442 (avg 0 GCs/tenure) root table 0 overflows