Turning off code generation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I have a fairly complex form with a lot of custom controls and components
(in the hundreds) and am having the problem that as the application grows the
automatic code generation is now taking close to a minute. Ironically,
compilation takes less than 5 seconds.

I am wondering if there was some way to turn this on and off or to
meaningfully speed it up. Anybody know of any article on this? I spend a lot
of time cursing, waiting for the IDE after unintentionally initiating another
code generation cycle by clicking on the wrong thing at the wrong time.

Thanks for any feedback,
Markus
 
Thanks for the tip.

I've already worked on serialization to a "human readable" (not XML)
plain-text file. It basically works, although my version is limited to
recording/restoring properties based on their CategoryAttribute. The final
product should have a base UI in code and then be cabable of loading a "skin"
by reading this text file.

I wish I knew why the existing code generation is so slow - my serializer
runs in under a second to generate a 900kB text file which contains most of
the data needed to construct each object.

It certainly might be interesting to get my deserializer to dynamically
instantiate objects (at present, all objects exist during deserialization,
the code acquires a reference based on an ID and then proceeds to set the
object's properties), at which point I could probably get rid of code
generation entirely. The serializer would also need to become a multi-pass
system - for example, the first pass would record all objects so, when
deserialized, they could be instantiated before any properties establishing
object links are set. I don't think I want to go down this route right now -
given all the time it took to get my serializer working to this point. I
would also need to tackle is serializing/deserializing event delegates - I
haven't spent a lot of time on this, so I'm guessing there's a way (e.g.
EventInfo class), but I remember struggling at some point when trying to
establish which, if any, delegates are connected to an event.

Thanks again for the tip.

Markus
 
Back
Top