So, I'm working on a project that takes a very complex entity from a third party framework and converts it into the native object that defines that entity. This entity has several one-to-many relationships, and a few of those have some one-to-many relationships. I've often been told nested loops are the worst, just absolute worst, as far as efficiency is concerned, but I really can't help it in this situation, as I'm working on a base object that's not going to change just to please me. The upshot to this, is this conversion only happens once per entity.
My concern over this is that I always assumed casting was supposed to be fairly instantaneous. There are no async calls involved in this conversion, and it's set up to be a batch job, so I don't really have to keep up with any UI updates or keeping users happy. For all intents and purposes, it's fine in the UI if the cast takes a while, but is there some other Technical reason a cast should run fairly efficiently? Does the CLR expect to run casts in a specific time frame?
If it matters at all, I'm doing explicit casts in c#.