speeding up compilation
Posted: Sat Apr 23, 2011 10:02 am
Hey Charles
i was wondering if compiling in cobra could be
speeded.
here is the senario
===================
one has to compile the code upto
BindImplementationPhase at least to have comprehensive
info but as the code grows time taken to compile grows too
for instance
file one.cobra
--------------
----------------------------------
now in above case user has merely changed the last line
removed num3 and returned the plus result without storing
in any temp variable
but the compiler has allready produced all the info
upto line 6) why should it waste time recalculating all the stuff
if atall i could specify/supply compiler with previously created nodes
and tell it to compile or create info from line number 7) and onwards using
the previously created info just like we do Node.SetCompiler(CobraMain.Compiler/or our compiler variable) etc..;
i should have a way to supply it with previoulsy created info that i stored for future use.
now imagine this programm had 10 files and naturally even for these two line change every file
needs to be recompiled because compiler has no way of knowing what has been typed new and how is it effecting
other files what if few new lines were actually extending a class which was declared partial somewhere else
compiler has to do everything again. and that takes time. so i request something about it should be done
i think it would be great feature for cobra atleast for tooling. or is it there allready??
in nutshell i should have power over compiling howmuch and what and get that added to allready produced info.
if you think it in terms of nodes it might be more clear that if only few nodes get bad/changed than only those
need to be changed and not the whole nodes from begining unless ofcourse the new change warranted everything to
be recalculated
Thanking_You
RIGHT_THEN
i was wondering if compiling in cobra could be
speeded.
here is the senario
===================
one has to compile the code upto
BindImplementationPhase at least to have comprehensive
info but as the code grows time taken to compile grows too
for instance
file one.cobra
--------------
1)def doCertainThings( num1 as int, num2 as int)
2) print 'in doCertainThings'
3) if ( num1 > 10 )
4) num1 = 10
5) if ( num2 > 20 )
6) num2 = 20
7)
8) num3 as int = num1 + num2
9)
10) return num3
----------------------------------
1)def doCertainThings( num1 as int, num2 as int)
2) print 'in doCertainThings'
3) if ( num1 > 10 )
4) num1 = 10
5) if ( num2 > 20 )
6) num2 = 20
7)
8) return num1 + num2
now in above case user has merely changed the last line
removed num3 and returned the plus result without storing
in any temp variable
but the compiler has allready produced all the info
upto line 6) why should it waste time recalculating all the stuff
if atall i could specify/supply compiler with previously created nodes
and tell it to compile or create info from line number 7) and onwards using
the previously created info just like we do Node.SetCompiler(CobraMain.Compiler/or our compiler variable) etc..;
i should have a way to supply it with previoulsy created info that i stored for future use.
now imagine this programm had 10 files and naturally even for these two line change every file
needs to be recompiled because compiler has no way of knowing what has been typed new and how is it effecting
other files what if few new lines were actually extending a class which was declared partial somewhere else
compiler has to do everything again. and that takes time. so i request something about it should be done
i think it would be great feature for cobra atleast for tooling. or is it there allready??
in nutshell i should have power over compiling howmuch and what and get that added to allready produced info.
if you think it in terms of nodes it might be more clear that if only few nodes get bad/changed than only those
need to be changed and not the whole nodes from begining unless ofcourse the new change warranted everything to
be recalculated
Thanking_You
RIGHT_THEN