Winform Preparing an object recognition hint. terribly slow.

Originally posted by mortenb123 on February 25, 2025

I just upgraded our TestExecute Workstation from 8GB win10 to 64GB win11

Far more recent processor and faster SSD.

The app is an old C# winform app we have recompiled frequently when there are updates and new compiler/.NET.

It was quite fast on win7 8GB, then slow on win10, and now everything is fast except for the
Preparing an object recognition hint. It is even slower on the new machine.

It may be win11, but it is a winform with lots of widget, I know Microsoft deprefacted winform, probably removing some stuff TE needed to do fast lookups in win7. TE now needs around 1minute to get the xml for the winform.

Are there any ways to speed it up? Add some debug libs when compiling?

Product manager do not warrant rewriting it to WPF or UWP.

Originally posted by Hassan_Ballan on February 25, 2025

To help isolate the root cause, can you create a new TestComplete project solely to check out the Preparing an object recognition hint. step that takes long time?

Do you get the same slow behavior in the new project?

Originally posted by scot1967 on February 25, 2025

Could you post a screenshot of the logging with the times as well as how the object(s) in question are currently mapped? Is extended find currently enabled?

There may be a few tips for you here…

https://support.smartbear.com/testcomplete/docs/testing-with/running/handling-errors/object-not-found/recognition-hints.html

Originally posted by scot1967 on February 25, 2025

Also, TestComplete has global NameMapping settings and project based runtime delays and code based delays that can be changed. These delays will affect the object recognition and are independent of the speed of the system. A 10,000 ms delay set in code or in the name map settings to aid in object ID stability on the slower system will still take 10,000 ms on the new system.

Originally posted by Hassan_Ballan on February 25, 2025

Also if you attempt to map a new object in the NameMapping, does it take a long time?

Originally posted by mortenb123 on February 25, 2025

Adding objects with ObjectSpy all goes fine. But the tree is massive. the NameMapping.tcNM file is 8000 lines. and the TypeInfo.dat is 2.6MB

Originally posted by Hassan_Ballan on February 26, 2025

Your NameMapping is large alright but there are too many variables to consider such as structure and extended find. As scot1967 suggested and as the following post Name Mapping too big ? | SmartBear Community pointing out, you can try it out in a new project.

When it happens, try to reproduce in new project by importing the NameMapping and isolating and copying the code to simulate. Once reproduced, experiment with the extended find and cleaning up the NameMapping.

Hope this helps.

Originally posted by scot1967 on February 26, 2025

When we ran into this issue. The solution was to limit search depth in our tests. This required specifying parent objects no more than a 8 or 10 nodes away from the target. This also helped to make object identification more stable as sometimes objects may have the same properties and TC will do a first match so your identification parameters have to be very specific.

Originally posted by rraghvani on February 26, 2025

Not sure what version of TC/TE you are using, but create a new project and change the Object Search Strategy in Project Settings to see if that makes any difference. Also, disable ‘Collect usage statistics’, ‘Use extended find when possible’ - it might help!

Originally posted by mortenb123 on March 26, 2025

Did a little subtest only usong this view, and it is smooth, no waiting, so it is the namemapping and typeinfo processing that takes it toll.

We are using latest version of TC 15.73.16

Originally posted by Hassan_Ballan on March 26, 2025

It would be a daunting task, but can you try to reduce the NameMapping size?

Originally posted by rraghvani on March 26, 2025

Since you have mentioned “8000 lines”, I don’t think there’s anyway of speeding this process up.