.NET

Reply
Active Contributor
48 Posts
1 Kudo
Registered: ‎11-28-2012
Post 1 of 3
Accepted Solution

XData vs XRecord in xrefs

662 Views, 2 Replies
12-18-2012 08:29 AM

Hi

 

I have created some files that have a long string as XData on every entity in the model. When I add the file as an xref it takes forever to get the file in as an xref when there is some size to the model. 

 

Would it be faster to use XRecord, or is there a better way that can speed the loading of these xrefs?

If the performance issues you are seeing are actually caused by the xdata (and I'm not sure that's the case), whether you can make improvements would depend on what exactly the xdata represents. For example, are there many entities that can contain identical values in their xdata (implying a 'one-to-many' relationship) ?  If so, then one way might be to store the duplicated string in one location (in the Named Objects Dictionary or a dictionary attached to the BlockTableRecord that contains the entities), and reference it using an ObjectId that can be stored in an XRecord attached to the referencing entities (ObjectId references are correctly translated by AutoCAD in the deep clone process, but there's no such translation for handle references in stored in Xdata).

 

 

ADN Support Specialist
352 Posts
27 Kudos
Registered: ‎07-24-2007
Post 2 of 3

Re: XData vs XRecord in xrefs

12-21-2012 02:08 PM in reply to: Fredrik.Larsen

How long are the strings?

 

Generally speaking, you wont see much of an improvement in performance between XData and XRecords unless you are storing more than say 16K of data (the limit of xdata). An Xrecord data limit is 250 mb

 

 





Fenton Webb

Developer Technical Services

Autodesk Developer Network


Valued Mentor
370 Posts
175 Kudos
Registered: ‎05-06-2012
Post 3 of 3

Re: XData vs XRecord in xrefs

12-22-2012 02:09 AM in reply to: Fredrik.Larsen

If the performance issues you are seeing are actually caused by the xdata (and I'm not sure that's the case), whether you can make improvements would depend on what exactly the xdata represents. For example, are there many entities that can contain identical values in their xdata (implying a 'one-to-many' relationship) ?  If so, then one way might be to store the duplicated string in one location (in the Named Objects Dictionary or a dictionary attached to the BlockTableRecord that contains the entities), and reference it using an ObjectId that can be stored in an XRecord attached to the referencing entities (ObjectId references are correctly translated by AutoCAD in the deep clone process, but there's no such translation for handle references in stored in Xdata).

 

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!