Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-02

TSimpleIPC documentation

17 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Vincent mentioned in another thread the TSimpleIPC class. Typing the class name and pressing F1 on it brings up no help. Is there any documentation on the TSimpleIPC class?

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys

OK skip that, I found the documentation on the FPC website, but why didn't Lazarus detect it via F1? I'm using Lazarus v0.9.25 r13826M i386-linux-gtk

SimpleIPC docs:
http://www.freepascal.org/docs-html/fcl/simpleipc/index.html

Graeme.

Graeme Geldenhuys wrote 15 lines
Hi, Vincent mentioned in another thread the TSimpleIPC class. Typing the class name and pressing F1 on it brings up no help. Is there any documentation on the TSimpleIPC class? Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Vincent Snijders
to Graeme Geldenhuys
Graeme Geldenhuys wrote 7 lines
OK skip that, I found the documentation on the FPC website, but why didn't Lazarus detect it via F1? I'm using Lazarus v0.9.25 r13826M i386-linux-gtk SimpleIPC docs: http://www.freepascal.org/docs-html/fcl/simpleipc/index.html

I think because the unit has changed location since fpc 2.2.0 or fpc 2.0.4. I think reshuffle is (almost) done, so we start thinking about getting these kind of dependencies fixed now. You can make a bug report, to make sure it won't be forgotten.

Vincent

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner wrote
This works here if you add the simpleipc unit to your uses clause.

Thanks Mattias. That was the problem. I didn't have the 'simpleipc' unit name in the uses clause. I simply typed the class name and pressed F1 on it, thinking it would find the help. I simply wanted to read up on the class (not use it yet).

BTW:
When selecting 'Help | Online Help' it brings up the 'Welcome to Lazarus' html page. Could we not maybe add links to the RTL, FCL, LCL online help in that page. That way we look through the help, without knowing the exact unit name etc... like my case in point with TSimpleIPC. I currently have the online help for RTL, FCL and LCL bookmarked in my browser, but when I move computers, I'm lost again and have to Google the links.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Vincent Snijders: I think because the unit has changed location since fpc 2.2.0 or fpc 2.0.4. I think…
Vincent Snijders wrote
I think because the unit has changed location since fpc 2.2.0 or fpc 2.0.4. I think reshuffle is (almost) done, so we start thinking about getting these kind of dependencies fixed now. You can make a bug report, to make sure it won't be forgotten.

Thanks Vincent. I'm using FPC 2.2.0 but that wasn't the issue. I didn't have the 'simpleipc' unit in my uses clause.

I still think it's a strange requirement for getting help on a class name, when you have no idea what the unit name for it is. It's a catch 22 situation. I first have to first 'Find in Files' for the TSimpleIPC class name to find the unit name. Type in the unit name in the uses clause, type the classname somewhere in my code and then press F1. This begs for improvement! ;)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gärtner
to Graeme Geldenhuys: Thanks Mattias. That was the problem. I didn't have the 'simpleipc' unit name in the uses…

Zitat von Graeme Geldenhuys :

Show quoted text 18 lines
On 19/02/2008, Mattias G?rtner wrote: > > This works here if you add the simpleipc unit to your uses clause. > Thanks Mattias. That was the problem. I didn't have the 'simpleipc' unit name in the uses clause. I simply typed the class name and pressed F1 on it, thinking it would find the help. I simply wanted to read up on the class (not use it yet). BTW: When selecting 'Help | Online Help' it brings up the 'Welcome to Lazarus' html page. Could we not maybe add links to the RTL, FCL, LCL online help in that page. That way we look through the help, without knowing the exact unit name etc... like my case in point with TSimpleIPC. I currently have the online help for RTL, FCL and LCL bookmarked in my browser, but when I move computers, I'm lost again and have to Google the links.

Good idea. I added the links.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner wrote
Yes, and I already started something. The problem is, that Lazarus and FPC comes with more than 130.000 identifiers (linux fpc 2.2.1) and that searching takes

Yikes!

Show quoted text 6 lines
some time. The search time is mostly limited by the harddisk speed, so the first time the search can take a minute on slow systems. Of course the second time the codetools finds the identifier in a second on recent systems. So, I was thinking about this: When the find declaration fails the IDE pops up a progress dialog with a cancel button, running the code browsing to locate candidates.

So the first attempt uses the uses clause? Second attempt will do the search.

I'm sure others will complain, but heres another though. :) What if you do the search at Lazarus startup. After Lazarus started and loaded it's first project, fire off a background thread (low priority) doing the searching. While the developers starts finding his feet and starts coding, Lazarus is collecting the lookup table (or whatever it needs) in memory in the background. Realistically, by the time the developer is looking for help on something, everything is already loaded. That cache information could maybe even be saved to the hard drive so at the next Lazarus startup the cache can be loaded from the hard drive first, making the lookup loading even quicker.

I guess some people would prefer to have the background search thread as a toggle option in Environment dialog.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 29 lines
On 19/02/2008, Mattias G?rtner wrote: > > Yes, and I already started something. The problem is, that Lazarus and FPC comes > with more than 130.000 identifiers (linux fpc 2.2.1) and that searching takes Yikes! > some time. The search time is mostly limited by the harddisk speed, so the > first time the search can take a minute on slow systems. Of course the second > time the codetools finds the identifier in a second on recent systems. > So, I was thinking about this: > When the find declaration fails the IDE pops up a progress dialog with a cancel > button, running the code browsing to locate candidates. So the first attempt uses the uses clause? Second attempt will do the search. I'm sure others will complain, but heres another though. :) What if you do the search at Lazarus startup. After Lazarus started and loaded it's first project, fire off a background thread (low priority) doing the searching. While the developers starts finding his feet and starts coding, Lazarus is collecting the lookup table (or whatever it needs) in memory in the background. Realistically, by the time the developer is looking for help on something, everything is already loaded. That cache information could maybe even be saved to the hard drive so at the next Lazarus startup the cache can be loaded from the hard drive first, making the lookup loading even quicker. I guess some people would prefer to have the background search thread as a toggle option in Environment dialog.

I for one would immediatly switch this off: I do not want such things to happen in the background. It's one of the first things I switch off in Windows/linux, since I don't use it anyway, so it is a waste of CPU cycles.

Michael.

Reply by email

Mattias Gärtner
to Graeme Geldenhuys: Yikes! So the first attempt uses the uses clause? Second attempt will do the search. I'm…

Zitat von Graeme Geldenhuys :

Show quoted text 8 lines
On 19/02/2008, Mattias G?rtner wrote: > > Yes, and I already started something. The problem is, that Lazarus and FPC comes > with more than 130.000 identifiers (linux fpc 2.2.1) and that searching takes Yikes!

Did I mention, that this is without packages?

Show quoted text 11 lines
> some time. The search time is mostly limited by the harddisk speed, so the > first time the search can take a minute on slow systems. Of course the second > time the codetools finds the identifier in a second on recent systems. > So, I was thinking about this: > When the find declaration fails the IDE pops up a progress dialog with a cancel > button, running the code browsing to locate candidates. So the first attempt uses the uses clause? Second attempt will do the search.

Yes. The uses clause normally reaches only a few thousand identifiers. That's why it so fast.

Show quoted text 10 lines
I'm sure others will complain, but heres another though. :) What if you do the search at Lazarus startup. After Lazarus started and loaded it's first project, fire off a background thread (low priority) doing the searching. While the developers starts finding his feet and starts coding, Lazarus is collecting the lookup table (or whatever it needs) in memory in the background. Realistically, by the time the developer is looking for help on something, everything is already loaded. That cache information could maybe even be saved to the hard drive so at the next Lazarus startup the cache can be loaded from the hard drive first, making the lookup loading even quicker.

I did some tests and I think a identifier database has only one advantage: On slow and low memory systems.
On recent computers the browsing is sufficient if done properly and boosted by a background pre loader thread.
And the code browsing can be used for some more advanced tools, while the identifier database is specific to one task. So I will first improve the code browsing and maybe eventually a database plugin.

I guess some people would prefer to have the background search thread as a toggle option in Environment dialog.

Indeed.

Mattias

Reply by email

Graeme Geldenhuys
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 8 lines
On Feb 19, 2008 11:30 AM, Graeme Geldenhuys wrote: > I'm sure others will complain, but heres another though. :) What if > you do the search at Lazarus startup. No way! If that is done it must be optional and off by default. My time is precious and I can't waste 1 minute (on a fast computer) every time I start my IDE.

That's why I mentioned that the thread must only start after the first project is loaded (while the developer is think about what to start coding) AND the thread must be in low priority as as not to slow down whatever the developer does.

But yes, I know all developers are different which is why I said it would also require a option to toggle that behaviour. :)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gaertner
to Felipe Monteiro de Carvalho: No way! If that is done it must be optional and off by default. My time is precious and I…
Show quoted text 8 lines
On Feb 19, 2008 11:30 AM, Graeme Geldenhuys wrote: > I'm sure others will complain, but heres another though. :) What if > you do the search at Lazarus startup. No way! If that is done it must be optional and off by default. My time is precious and I can't waste 1 minute (on a fast computer) every time I start my IDE.

The 1 minute is only on slow computers. On fast computers it can be less than 5 secs.
You can get an approximation for your computer:
- use a recent lazarus from svn
- View / Code Browser / Scope / Lazarus IDE and check 'View required packages'. The window feels a bit sloppy because it scans on idle.

This is only an upper bound, because the code browser reads *all* identifiers (e.g. together with procedure parameters) and fills the 100-200 thousand identifiers into a TTreeView. This is not needed for a simple search.

Mattias

Reply by email

Vincent Snijders
to Mattias Gaertner
Mattias Gaertner wrote 23 lines
On Tue, 19 Feb 2008 18:32:01 +0100 "Felipe Monteiro de Carvalho" wrote: > On Feb 19, 2008 11:30 AM, Graeme Geldenhuys > wrote: >> I'm sure others will complain, but heres another though. :) What if >> you do the search at Lazarus startup. > No way! If that is done it must be optional and off by default. My > time is precious and I can't waste 1 minute (on a fast computer) every > time I start my IDE. The 1 minute is only on slow computers. On fast computers it can be less than 5 secs. You can get an approximation for your computer: - use a recent lazarus from svn - View / Code Browser / Scope / Lazarus IDE and check 'View required packages'. The window feels a bit sloppy because it scans on idle. This is only an upper bound, because the code browser reads *all* identifiers (e.g. together with procedure parameters) and fills the 100-200 thousand identifiers into a TTreeView. This is not needed for a simple search.

It leaks also.
Heap dump by heaptrc unit
19285798 memory blocks allocated : 1417461011/1472321456 18138576 memory blocks freed : 1377766319/1429527048 1147222 unfreed memory blocks : 39694692
True heap size : 139460608 (240 used in System startup) True free heap : 16303360
Should be : 32421528

I can send you the details of the leaks (back traces) on request.

Vincent

Reply by email

Mattias Gaertner
to Vincent Snijders
Show quoted text 36 lines
Mattias Gaertner schreef: > On Tue, 19 Feb 2008 18:32:01 +0100 > "Felipe Monteiro de Carvalho" > wrote: > >> On Feb 19, 2008 11:30 AM, Graeme Geldenhuys >> wrote: >>> I'm sure others will complain, but heres another though. :) What >>> if you do the search at Lazarus startup. >> No way! If that is done it must be optional and off by default. My >> time is precious and I can't waste 1 minute (on a fast computer) >> every time I start my IDE. > > The 1 minute is only on slow computers. On fast computers it can be > less than 5 secs. > You can get an approximation for your computer: > - use a recent lazarus from svn > - View / Code Browser / Scope / Lazarus IDE and check 'View required > packages'. The window feels a bit sloppy because it scans on > idle. > > This is only an upper bound, because the code browser reads > *all* identifiers (e.g. together with procedure parameters) and > fills the 100-200 thousand identifiers into a TTreeView. This is > not needed for a simple search. It leaks also. Heap dump by heaptrc unit 19285798 memory blocks allocated : 1417461011/1472321456 18138576 memory blocks freed : 1377766319/1429527048 1147222 unfreed memory blocks : 39694692 True heap size : 139460608 (240 used in System startup) True free heap : 16303360 Should be : 32421528 I can send you the details of the leaks (back traces) on request.

Yes, please. It does not leak here.

Mattias

Reply by email

Bogusław Brandys
to Graeme Geldenhuys: Yikes! So the first attempt uses the uses clause? Second attempt will do the search. I'm…
Graeme Geldenhuys wrote 33 lines
On 19/02/2008, Mattias G?rtner wrote: > Yes, and I already started something. The problem is, that Lazarus and FPC comes > with more than 130.000 identifiers (linux fpc 2.2.1) and that searching takes Yikes! > some time. The search time is mostly limited by the harddisk speed, so the > first time the search can take a minute on slow systems. Of course the second > time the codetools finds the identifier in a second on recent systems. > So, I was thinking about this: > When the find declaration fails the IDE pops up a progress dialog with a cancel > button, running the code browsing to locate candidates. So the first attempt uses the uses clause? Second attempt will do the search. I'm sure others will complain, but heres another though. :) What if you do the search at Lazarus startup. After Lazarus started and loaded it's first project, fire off a background thread (low priority) doing the searching. While the developers starts finding his feet and starts coding, Lazarus is collecting the lookup table (or whatever it needs) in memory in the background. Realistically, by the time the developer is looking for help on something, everything is already loaded. That cache information could maybe even be saved to the hard drive so at the next Lazarus startup the cache can be loaded from the hard drive first, making the lookup loading even quicker. I guess some people would prefer to have the background search thread as a toggle option in Environment dialog. Regards, - Graeme -

Very good idea, maybe sqlite3 database could be used with index ? It will be very very fast solution but one additional library is needed :-( (sqlite3.dll under windows).Anyway any flat database could be useful with fast indexing.

Regards
Boguslaw

Reply by email