Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1848: Find references unusable slow
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

eve
Tomato Guru

Belgium
101 Posts

Posted - May 12 2011 :  01:50:13 AM  Show Profile  Reply with Quote
We installed build 1848 on several machines (all VS2010, Win 7 64x).

Since this build, 'find references' takes forever. In the status bar it says 'VA X: Creating instance of template :...'. While it is doing this, the stop button does sometimes not work.
We use the boost libraries and I noticed it takes particularly long to instantiate these templates.

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - May 12 2011 :  1:10:43 PM  Show Profile  Reply with Quote
Which version of Boost are you using?

Can you post a couple of lines of sample code to show me what you are doing? I assume you are having problems with specific template types in boost, but which ones?

Are you seeing a similar problem with any non boost template code, assuming you use any?

zen is the art of being at one with the two'ness
Go to Top of Page

eve
Tomato Guru

Belgium
101 Posts

Posted - May 13 2011 :  02:35:22 AM  Show Profile  Reply with Quote
Currently we use boost 1.43.0. Note that the boost libraries were included in the list of stable include files (VAX Options -> Projects -> C/C++ Directories).
I also see the problem with template classes of our own and in std libraries, I assume that the boost libraries just jump out because they have so many templates classes.

It's really hard to point a finger on what code might be causing the problem, I have the impression that all template classes are expanded over and over again. So I have no idea on what code I could post here.
I tried to enable logging, and in the log file I could see that various template instance are created 9 times. Of course I have no idea if this is expected or not.
I also tried to do this with build 1845 and then a lot less template classes were created. If it helps, I could send you the 2 log files.

Thanks for your help,
eli
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - May 13 2011 :  1:48:41 PM  Show Profile  Reply with Quote
The log files might offer some clues, so please do send them. Please submit the files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up.

If you just use the very simple code sample:


#include <boost\\shared_ptr.hpp>

struct simplePtrTestStruct
{
	int nStructMember1;
	int nStructMember2;
};

void testSimpleTemplateTypes()
{
	std::map<int, long> stdMapSimple;
	std::map<std::string, std::pair<long, long> > stdMapStringPair;
	std::shared_ptr<simplePtrTestStruct> stdSharedPtr;
	boost::shared_ptr<simplePtrTestStruct> boostSharedPtr;
	stdSharedPtr->nStructMember1 = 0;
	boostSharedPtr->nStructMember2 = 0;
}


are you seeing any problems with Find References on any of the variables? This test code may be far to simple, but it gives us somewhere to start.

For the record I am not seeing any Find References problems at all in VA 1848 in VS2010 so far.

zen is the art of being at one with the two'ness
Go to Top of Page

eve
Tomato Guru

Belgium
101 Posts

Posted - May 16 2011 :  03:08:39 AM  Show Profile  Reply with Quote
The log files are sent.
As for the test code: I cannot reproduce the issue with this code. I also did a few experiments with adding namespaces and introducing a header, but I still did not get problem.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - May 16 2011 :  2:21:29 PM  Show Profile  Reply with Quote
We have the log files, thank you for these:

case=57464

In your solution, are you ever seeing this very slow Find References problem with the template's I used in my test code? I just picked a few simple, common templates that I am familiar with.

Could you give me the names of a couple of template classes where you see this problem, so I can try them here?

zen is the art of being at one with the two'ness
Go to Top of Page

eve
Tomato Guru

Belgium
101 Posts

Posted - May 17 2011 :  3:41:14 PM  Show Profile  Reply with Quote
I did not see the problem with boost shared_ptr or with std::shared_ptr.
I have the problem with our own template classes, but also with std and boost template classes:
- std::list
- std::map
- boost::function
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - May 17 2011 :  7:46:40 PM  Show Profile  Reply with Quote
Using the following simple test code I am not seeing any problems. Is this the type of code that you would expect to show problems?

In the header file I have:

#include <map>
#include <list>

struct testDataStructForTemplates
{
	int nDataOne;
	int nDataTwo;
};

class usingMapListTemplates
{
private:
	std::map<int, testDataStructForTemplates> mapNumberData;
	std::map<std::string, testDataStructForTemplates> mapNameData;
	std::list<long> listNumbers;
	std::list<std::string> listNames;
	std::list<testDataStructForTemplates> listData;
	std::list<std::map<int, testDataStructForTemplates> > listMapNumberData;

public:
	void initialiseData();
	void scanData();
};



and in the cpp file I have:


void usingMapListTemplates::initialiseData()
{
	mapNumberData[1].nDataOne = 11;
	mapNumberData[1].nDataTwo = 12;
	mapNumberData[2].nDataOne = 13;
	mapNumberData[2].nDataTwo = 14;
	mapNumberData[3].nDataOne = 15;
	mapNumberData[3].nDataTwo = 16;
	
	mapNameData["fred"].nDataOne = 3;
	mapNameData["jane"].nDataTwo = mapNameData["fred"].nDataOne + 3;
	
	listNumbers.push_back(23);
	listNumbers.push_back(47);
	listNumbers.push_back(81);

	listNames.push_back(std::string("barbara"));
	listNames.push_back(std::string("lucy"));

	testDataStructForTemplates dataInstance1, dataInstance2;
	dataInstance1.nDataOne = 1;
	dataInstance1.nDataTwo = 1;
	dataInstance2.nDataOne = 2;
	dataInstance2.nDataTwo = 2;
	listData.push_front(dataInstance1);
	listData.push_front(dataInstance2);

	listMapNumberData.push_back(mapNumberData);
}

void usingMapListTemplates::scanData()
{
	int nTotal = 0;

	std::map<int, testDataStructForTemplates>::iterator it1;
	for(it1 = mapNumberData.begin(); it1 != mapNumberData.end(); ++it1) { }

	std::map<std::string, testDataStructForTemplates>::iterator it2;
	for(it2 = mapNameData.begin(); it2 != mapNameData.end(); ++it2) { }

	std::list<std::map<int, testDataStructForTemplates> >::const_iterator it3;
	for(it3 = listMapNumberData.begin(); it3 != listMapNumberData.end(); ++it3) { }
}

zen is the art of being at one with the two'ness

Edited by - feline on May 17 2011 7:47:12 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - May 18 2011 :  3:29:08 PM  Show Profile  Reply with Quote
Being discussed via email

zen is the art of being at one with the two'ness
Go to Top of Page

eve
Tomato Guru

Belgium
101 Posts

Posted - May 18 2011 :  3:34:49 PM  Show Profile  Reply with Quote
Indeed, and to be clear: I did not have the time yet to use the new sample code you posted.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - May 24 2011 :  11:38:55 AM  Show Profile  Reply with Quote
This slowdown was opened as case=57571.

case=57571 is fixed in build 1849.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000