Jan 20, 2014 at 3:19 PM
Edited Jan 20, 2014 at 6:02 PM
Based on information given at
we tried to extend OData by creating own custom OData formatter.
Everything works now as expected except performance: a query to a database with many columns takes more than 10 or 15 seconds.
Our implementation consists of a custom ODataSerializerProvider that extends DefaultODataSerializerProvider and has a custom ODataEntityTypeSerializer with public override ODataEntry CreateEntry(SelectExpandNode selectExpandNode, EntityInstanceContext entityInstanceContext)
method where we have our logic which changes an instance of SelectExpandNode (we replace names of columns there)
If we call a default implementation of DefaultODataSerializerProvider, results seems to be in cache after the first execution so the performance is ok. Even if we call our custom implementation with the base logic, where we just call :
var entryTest = base.CreateEntry(selectExpandNode, entityInstanceContext);
the performance in this case is poor, it takes 2 or 3 seconds, default response comes in a less then 1 second.
Do we miss something?