Hi guys,
We’re running into an issue with metadata generation. We have a recursive data type for modeling dynamic data in our system and the two main fields in the DTO are below:
DataType Parameters:
Name Parameter Data Type Required Description
TypeName form string No
Fields form List<DataField> No
DataField Parameters:
Name Parameter Data Type Required Description
Id form string No
Name form string No
Type form ValueTypes No
UIHint form UIHints No
UITab form string No
IsAsync form bool No
DisableBinding form bool No
StructType form DataType No
ListType form DataType No
Description form string No
PossibleValues form List<string> No
IsOutput form bool No
CustomFieldValuesUrl form string No
DefaultValue form Value No
TransitionNameFormat form string No
Uniqueness form DataFieldUniqueness No
VoiceOnly form bool No
ConditionalVisibilityField form string No
ConditionalVisibilityValue form string No
NoEvalTemplate form bool No
UserMode form UserDataFieldModes No
AnyValueType form bool No
You’ll note that the DataType class has a list of DataFields and one of the optional fields on a DataField is the StructType which refers back to DataType.
When going to a metadata page for this it freezes for about 20 seconds and then spits out the metadata page with the example JSON taking multiple pages:
The issue isn’t the long example text but rather that when end users think the metadata page isn’t loading, they hit refresh a few times starting multiple instances of the metadata handler and the CPU spikes considerably.
I did some digging into the code and I can see that there is some sort of recursive counter that is used to break out of these types of data structures, but it would be great to be able to exclude certain fields from metadata or something without excluding entire requests.
Any thoughts? This is on servicestack 8.7.0