DirSizeCalc 1.21 (content plug-in)

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2roentgen666
OK I created such a file but the compressed file size is displayed fine.
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

Same here with the file, but check the directory containing the file.
TC for Linux please!
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2roentgen666
The directory filesize is also correct here.
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

2Lefteous
Does TC display the warning about file names from a different code page (a TC restart may be needed)? If not try using charmap.exe and find a suitable unicode character. I could reproduce this by using some greek letters.
TC for Linux please!
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2roentgen666
Thanks I could reproduce it now. I'll investigate.
User avatar
GammelBert
Member
Member
Posts: 109
Joined: 2007-02-21, 18:42 UTC
Location: Germany

Post by *GammelBert »

Hi!

nice Plugin!

A cache would be a really great feature.
Which priority does calculation have? I don't want it to steal my other processes CPU time.

I want to replace the builtin size column with DirSizeCalc size column. Is its speed for calculating file sizes equal to the builtin size column? Is file size calculated twice if I add the plugin column to the builtin one?

I would like to request a command to toggle DIR size calculation on/off so I could add a button for this command.

Regards!
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2GammelBert
Hi,
A cache would be a really great feature.
DirSizeCalc doesn't have a cache for two reasons
- The filesystem caches the calls made by DirSizeCalc. Subsequent calls are much faster tha first calculation on a directory.
- DirSizeCalc is just a content plug-in. A caching system should be introduced not by every individual plugin but by TC itself.
Which priority does calculation have? I don't want it to steal my other processes CPU time.
DirSizeCalc uses a background thread which is created by TC not by the plug-in. Anyway the plug-in doesn't require too many cpu resources but it does a lot of hard disk drive reading. I don't really want to change change a thread priority created by TC. This is again something to set in TC.
I want to replace the builtin size column with DirSizeCalc size column. Is its speed for calculating file sizes equal to the builtin size column?
The calculation speed should be identical.
Is file size calculated twice if I add the plugin column to the builtin one?
No it should be performed only once. Just don't add a field tc.Size.
I would like to request a command to toggle DIR size calculation on/off so I could add a button for this command.
That's a very good idea. It's also a task which cannot be performed by the plug-in but by TC. I have made similiar requests a long time ago but unfortunately they have not been added to TC.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Lefteous wrote:DirSizeCalc is just a content plug-in. A caching system should be introduced not by every individual plugin but by TC itself.
I don't agree. How could TC now if "content" of a file (or directory) changed? It could cache the contents only as long as nothing with the file changed, not on virtual file systems. But even this is not safe enough. Sb. may read information about the file i.e. in the registry or in Locate-like database.
Only the plugin writer can determine whether the content of the file changed. Of course, this can be added to the interface, but I'm not sure if it's worth effort.

And the second thing: the plugin writer can sometimes create a more efficient buffer, one that doesn't have to read everything from scratch. If DirSizeCalc could determine where something changed, it could recalculate only one branch in the directory tree. And usually the plugin cache could be stored in a way that takes less space than a string for each file.
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2m^2
How could TC now if "content" of a file (or directory) changed?
I always wondered what the refresh page in the configuration dialog is about ;-)
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Lefteous wrote:2m^2
How could TC now if "content" of a file (or directory) changed?
I always wondered what the refresh page in the configuration dialog is about ;-)
It's not about plugins, is it? ;->
ADD:
Yes, we need another interface that will tell TC "Hey you, reread me, I have something important to tell! Hallo, are you listening? I'm here! (...)"
;)
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2m^2
It's not about plugins, is it?
It just proves TC knows a lot about changes in the filesystem.
es, we need another interface that will tell TC "Hey you, reread me, I have something important to tell! Hallo, are you listening? I'm here!
Plug-ins work vive-versa. If TC thinks the information belonging to a file should be updated it asks the plug-in again. Otherwise the currently displayed values are used.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Lefteous wrote:2m^2
It's not about plugins, is it?
It just proves TC knows a lot about changes in the filesystem.
Not enough. Even for DirSizeCalc. Trying to know more could significantly slow the system down.
Lefteous wrote:
es, we need another interface that will tell TC "Hey you, reread me, I have something important to tell! Hallo, are you listening? I'm here!
Plug-ins work vive-versa. If TC thinks the information belonging to a file should be updated it asks the plug-in again. Otherwise the currently displayed values are used.
There could be a message based system "I changed". It'd need something that tells the plugin, which files are visible.

I don't request such interface. I don't think it's worth it. But universal interface...that's a different thing.
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2m^2
Not enough. Even for DirSizeCalc. Trying to know more could significantly slow the system down.
Well then I don't understand your suggestion to observe whole trees. That's a real performance killer - if my plug-in does that or TC doesn't matter.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Lefteous wrote:2m^2
Not enough. Even for DirSizeCalc. Trying to know more could significantly slow the system down.
Well then I don't understand your suggestion to observe whole trees. That's a real performance killer - if my plug-in does that or TC doesn't matter.
Yes, as I said, it would be slow.
And I didn't say that doing this by a plugin would be faster - just that plugin knows better what's important for it.
2 thoughts later: It wouldn't also be good if several plugins checked the same...so what I wrote before was not really a good solution. But if there was cooperation between plugins...it could work ;)
User avatar
GammelBert
Member
Member
Posts: 109
Joined: 2007-02-21, 18:42 UTC
Location: Germany

Post by *GammelBert »

GammelBert wrote:
I would like to request a command to toggle DIR size calculation on/off so I could add a button for this command.
I just want to add that I am concerned about the health of my harddisk. I need this plugin only sometimes. So I don't want to stress my harddisk more than nescessary. This plugin could reduce its lifetime because it is reading so much from the harddisk.
Post Reply