any way to get large forms to run on emulator?

  • Thread starter Thread starter khorad
  • Start date Start date
K

khorad

i get a system.notsupportedexception on InitializeComponent()

from previous threads it appears there is a 64KB method size limit or
something when using the emulator

it does work on the real device

his solution was to split initialize into two methods, but i think that
would mess up the form designer

so is there anyway to get this to work on the emulator while still using the
form designer?

i feel like i'm stuck back in 1988 worrying about 64k limitations
 
AFAIK The difference in behavior is caused by the difference in the
instruction set. JIT-compiler attempts to compile the code but hits size
limitations when generating short jumps, which due to the nature of x86
instruction set cannot exceed 64K. I believe it to be a JIT-compiler
shortcoming, which unfortunately you have to live with.

OTOH consider the fact that if form designer code has exceeded 64 K, you
have a form which has too many controls. I cannot envision a form which
would run over 64 K in intialization and yet consist of one page - you must
be using tab control with a large number of tabs. You may want to redesign
the form to split it into several subforms. The upside is that form
initialization time will become tolerable. In fact it is likely that if you
add several more controls to your form, you will end up over the limit on
ARM cpu as well...

As for feeling like being back in 1988 - for some reason people tend to
forget, that we are still dealing with embedded devices. Small memory
footprint, limited resources etc.
 
You may want to redesign
the form to split it into several subforms. The upside is that form
initialization time will become tolerable.

well i guess that's what i'm doing although form load time was not an issue
before and it just adds that much more complexity to the program
which due to the nature of x86
instruction set cannot exceed 64K.

are you saying that the full .net framework has this issue too? heaven help
us . . .
 
khorad said:
are you saying that the full .net framework has this issue too? heaven help
us . . .
No, I'm saying that JIT-compiler on the device/emulator has its limitations.
The JIT-compiler used on emulator is by far not the same one used on the
desktop. To the best of my knowledge on the device you don't get a
combination of fast non-optimizing compiler/slow optimizing recompile in the
lazy thread, but I may be mistaken on this one
 
Back
Top