As always your input is greatly appreciated. I am sure I speak for everyone when I invite you to post fixes to problems you recognize. It probably would have taken you less time to fix the -gc3 omissions than writing this message. :-) In such cases it is more productive to simply post the fix, even if you envision a deeper more complete rewrite, as a better ultimate solution.
As to deeper changes and rewrites, they are welcomed too, as long as compatibility is maintained.
Again, many thanks, and I hope to quickly see some of your fixes.
Post by Przemyslaw CzerpakHi,
Post by Andi JahjaHello,
"WITH OBJECT excessive nesting!"
As per default build, HB_MAX_WITH_OBJECT is preset to 64.
But I am very sure that my application does not have that much nests.
This occurs when I repeatedly execute sub function containing WITH OBJECT.
I suspect the counter is not released after a nest reached an "END"
Anyone?
After short checking current HVM code in xHarbour I can see two possible
1. You are using recursion.
Due to limitation in xHarbour implementation FOR EACH and WITH OBJECT
cannot be used in algorithms using recursion because they can reach
HB_MAX_WITH_OBJECTS or HB_MAX_ENUMERATIONS limits.
It's very serious problem I reported nearly 10 years ago.
To resolve it it's necessary to redesign FOR EACH and WITH OBJECT
implementation in xHarbour. It would be nice to also eliminate
overhead caused by current code. Even if programmer does not use
above constructions then HVM in xHarbour executes additional code
to initialize and finally clean FOR EACH and WITH OBJECT counters
and containers on each PRG function call what reduces overall
performance. The implementation in Harbour does not have such
problems so it can be taken as base.
2. Looks that code executed for -gc3 output does not restore FOR EACH
and WITH OBJECT counters. Such additional cleanup it's yet another
overhead in current implementation which can be eliminated new one.
#include "hbclass.ch"
proc main()
local i
for i := 1 to 100
begin sequence
with object i
if i < 100
break
endif
end with
endsequence
next
return
This can be easy fixed anyhow I strongly suggest to start deeper
modifications which resolved also other problems.
best regards,
Przemek
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
xHarbour-developers mailing list
https://lists.sourceforge.net/lists/listinfo/xharbour-developers