Strange speed result

Apr 9, 2011 at 9:46 AM

I test mapper several times in one query and got strange results.

iteration 1 : 286ms    //as expected
iteration 2 : 1398ms   //why?
iteration 3 : 57ms
iteration 4 : 57ms
iteration 5 : 57ms

Why the second iteration has such a strange time?

code: http://pastebin.com/cKzD9DCB
database: MS Access 2007

Coordinator
Apr 9, 2011 at 3:38 PM

Interesting.  Was it a system hiccup, or is it happening consistently?

I attempted to reproduce your test by adding a similar test to the Marr.Data.IntegrationTests project, but there were no spikes after the initial load.  I would be glad to look at it more closely if you can send me the database file.

Jordan

 

Apr 9, 2011 at 8:14 PM

Sorry for my bad english.

It is happens consistently.

I could not run the tests due to problem with Access Drivers on x64. So I just moved "TimedTest_PassingInQueryText" into my test project.
I executed tests from the visual studio and direct. The results were the same (see readme.txt in the archive)

Also, it seems, that on "cold start" (the first run after reload system or fisrt change platform version) the first iteration execution time was  proportional to the second.
But the second iteration always shows a strange time.

project archive: http://rghost.ru/5146615

md5:8F5F0B711913EF2C4CF3CAED1C350DBF

Apr 10, 2011 at 11:08 AM

I tried to execute tests on another computer (Win 7 x86).

SELECT test 1 or 2
1
iteration 1 : 1233ms
iteration 2 : 43ms
iteration 3 : 42ms
iteration 4 : 42ms
iteration 5 : 46ms

SELECT test 1 or 2
2
iteration 1 : 1229ms
iteration 2 : 55ms
iteration 3 : 51ms
iteration 4 : 53ms
---------------
Average time after inital load: 53

It seems, this is "the feature" of my system or x64 platform with multi-core processor

Coordinator
Jun 15, 2011 at 1:40 PM

I know this is an old thread, but that first spike in time can be avoided by using the new MapBuilder feature to build the mappings.  This way the mappings would already exist in memory before the first query was run.

Come to think of it, it might be a good idea if the attribute mappings were pre-loaded when the project starts as well.