Re: [fpc-devel] LocalReferenceFixup

2010-10-06 Thread Martin Schreiber
On Tuesday, 5. October 2010 17.24:09 José Mejuto wrote:
 Hello FPC,

 Tuesday, October 5, 2010, 4:08:08 PM, you wrote:
  As you can see the Loaded event is called (marked with some //-)
  before calling GlobalFixupReferences,

 MS Not if GlobalLoaded is set.

 Yes, but it is not set, because BeginGlobalLoading is not called at
 all from any point in the code, nor in fpc/rtl nor in Lazarus lcl, nor
 in Lazarus IDE, but the IDE is not the important thing as the main
 problem is at runtime. Only LNet httpsvlt is calling the
 BeginGlobalLoading unless some other call it using some kind of
 opaque pointer :-?

Avoid circular component references in the forms and adjust the creation order 
that the referencing forms are created later or use

MSEgui:

 msebegingloballoading;
[...] create the forms
 mseendgloballoading;


Lazarus:

 begingloballoading;
[...] create the forms
 notifygloballoading;
 endgloballoading;

(not tested).

Martin
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Pre-zeroing in MM by background thread/process

2010-10-06 Thread Florian Klaempfl
Am 06.10.2010 05:57, schrieb Adem:
  I did a global search on trunk\compiler and found the following numbers:
 
 GetMem(): 212 hits
 FillChar(): 362 hits
 
 I haven't checked any other fpc folder, but I am sure those figures
 would multiply.
 
 What I did notice was that GetMem() and FillChar() were being used in
 pairs most of the time --as opposed to using AllocMem() which had  16 hits.
 
 My focus isn't on the merits of using AllocMem() instead of GetMem() and
 FillChar() pair; what I do notice is the fact that in a lot of places
 there is a strong need for zeroed memory.
 
 That brings me to the idea of handling the zeroing of memory chunks by
 the memory manager (MM) instead of doing it in-line.

A similiar idea has been discussed already here:
http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg17846.html

Besides this, it is pretty simple: give it a try and provide a patch.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Pre-zeroing in MM by background thread/process

2010-10-06 Thread Sven Barth

Am 06.10.2010 05:57, schrieb Adem:

I did a global search on trunk\compiler and found the following numbers:

GetMem(): 212 hits
FillChar(): 362 hits


[...]

---
More hit data:

fpc/trunk/packages/
GetMem(): 1464 hits
FillChar(): 608 hits

trunk/lazarus/
GetMem(): 522 hits
FillChar(): 1366 hits



You might also search in rtl/ (especially objpas), because that contains 
the core of FPC's class system (and almost everything passes through 
that code some time).


You might also try a proof of concept implementation of your idea to 
demonstrate whether there really is a benefit (you can replace the 
default memory manager, so you should be able to test this without 
touching the current default heap manager).


Regards,
Sven
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re[2]: [fpc-devel] LocalReferenceFixup

2010-10-06 Thread José Mejuto
Hello FPC,

Wednesday, October 6, 2010, 8:37:44 AM, you wrote:

 Yes, but it is not set, because BeginGlobalLoading is not called at
[...]
MS Avoid circular component references in the forms and adjust the creation 
order
MS that the referencing forms are created later or use
[...]
MS Lazarus:
MS 
MS  begingloballoading;
MS [...] create the forms
MS  notifygloballoading;
MS  endgloballoading;
MS 
MS (not tested).

I think I can see your point, but from the end user point of view
this is not a possibility. How to tell to the user, Remeber you must
call beginglobal... and notifyglobal... and finally endglobal... when
you create forms with components that need a global loading link
reference fixup :-?

Moreover user can not take care of creation order, it is not
deterministic (AFAIK), there is no way to change it in Lazarus and
finally it defeats the drag/drop/design paradigm. I have a form with
25 SQLQuery, 23 of them are chained in some way, if I need a new one
at the beginning I must delete 23, add the new one, create or paste
the 23 again and relink manually again ?

So the final question, should this moved from fpc-devel to Lazarus
mailing list ? Is it not considered a bug in the TReader ?

Thank you.

-- 
Best regards,
 José

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel