Sign in Join

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

Mailing lists / lazarus / 2012-08

Delphi converter scanning the parent directory for unit files

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Juha Manninen

Hi

There was discussion about the background scanning thread that runs automatically when the converter's settings dialog is shown. It is true that the user must have control over it.

One idea was to ask about it in a new dialog window. I don't like it, I have tried to get rid of the numerous question dialogs that are popping up.

Another idea was to add an option for it in the settings dialog. This would break the original clever (?) idea of running the thread while the settings dialog is shown thus not adding any delay for the actual conversion in most cases. If the scanning can be started only after the dialog then there is no use for a separate thread.

I solved it now by still starting the thread automatically but adding a ProgressBar and a "Stop"-button for the user.
The scanning can be stopped anytime, for example in case of a slow file-system or exceptionally big directory structure in the project's parent dir.

Please test with Lazarus trunk.

Regards,
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120825/e1781234/attachment-0001.html>

Reply by email

Reinier Olislagers
to Juha Manninen
Juha Manninen wrote
There was discussion about the background scanning thread that runs automatically when the converter's settings dialog is shown. It is true that the user must have control over it.

<snip>

Show quoted text 5 lines
I solved it now by still starting the thread automatically but adding a ProgressBar and a "Stop"-button for the user. The scanning can be stopped anytime, for example in case of a slow file-system or exceptionally big directory structure in the project's parent dir.

Good idea.

Please test with Lazarus trunk.

Seems to work fine with a Delphi project under d:\cop. Didn't even see a screen where it was scanning for files.
FPC x86 2.6.1, Windows Vista x64, NTFS, 17 dirs in d:\, but 0 files.

Converter has been improved since the last time I used it as well. Nice ;)

Thanks Juha!

Reply by email

Juha Manninen
to Reinier Olislagers

On Sat, Aug 25, 2012 at 8:12 PM, Reinier Olislagers <

Show quoted text 7 lines
wrote: > Please test with Lazarus trunk. Seems to work fine with a Delphi project under d:\cop. Didn't even see a screen where it was scanning for files. FPC x86 2.6.1, Windows Vista x64, NTFS, 17 dirs in d:\, but 0 files.

Yes, I forgot to mention that the Bart's improvement is also included. It prevents scanning the root directory.
I think it is a good rule even it does not make difference between the drives (C:\, D:\ ...).

If you want to see the ProgressBar and a "Stop"-button, place your project for example beside Lazarus source tree (or FPC source tree) so they have the same parent directory.
I am afraid it will be slower on Windows. On Linux it happens quickly especially when the files are once cached by the OS.

Converter has been improved since the last time I used it as well. Nice ;)

Thanks for the feedback. In fact there have not been any big changes for some time, only small improvements and fixes.
Maybe they pile up in the end.

Regards,
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120826/8444e551/attachment.html>

Reply by email

Reinier Olislagers
to Juha Manninen
Juha Manninen wrote 19 lines
On Sat, Aug 25, 2012 at 8:12 PM, Reinier Olislagers < <mailto:>> wrote: > Please test with Lazarus trunk. Seems to work fine with a Delphi project under d:\cop. Didn't even see a screen where it was scanning for files. FPC x86 2.6.1, Windows Vista x64, NTFS, 17 dirs in d:\, but 0 files. Yes, I forgot to mention that the Bart's improvement is also included. It prevents scanning the root directory. I think it is a good rule even it does not make difference between the drives (C:\, D:\ ...). If you want to see the ProgressBar and a "Stop"-button, place your project for example beside Lazarus source tree (or FPC source tree) so they have the same parent directory. I am afraid it will be slower on Windows. On Linux it happens quickly especially when the files are once cached by the OS.

Yep, putting it in c:\development next to my fpcup Lazarus+FPC does show the bar ;)
Stopping it works nicely.
Very well thought-out feature, thanks Juha!

Reply by email