Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:41 06 Sep 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : @Peter: Strange behavior of MM.INFO(MODIFIED FName$)?

Author Message
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1769
Posted: 04:40pm 16 Sep 2025
Copy link to clipboard 
Print this post

First of all, this is just information and not a request for a firmware change.
Picomite 2350 version 6.01.00.b5
The test was performed on drive B:. Sorting is not performed!

Hi Peter,
while working on the FM (File Manager), I encountered a strange problem. The FM works quite satisfactorily up to about 200 files/folders. Vadim probably rightly limited it for this reason.

In my test version, I increased the possible number to 400 and have about 300 files/directories in the root directory. Sorting by name works satisfactorily, but sorting by date is a pain. Partly, of course, this is due to the simulated Windows/pop-up functions; all data often has to be reread and sorted for a new screen refresh. However, I had the impression that the slowdown wasn't linear, in short: (but I was wrong; it is linear: The formula is: -0.19+x*20.95. Where x is the position (!) of the element, the result is the time required for mm.info(Modified File$).). And therefore unusable for many applications, I'm afraid.

I wanted to know exactly why, so I ran some tests and ultimately wrote a small test program as proof.



The result shows that reading the same amount of data with mm.Info(MODIFIED File$) at a higher position in the array takes significantly longer.




The result is that with 300 elements, the last 10 elements take 50-100 times longer to read mm.Info(MODIFIED FName$) than the first 10 elements. This is probably the main factor, but the length of the file name also has a significant influence. I tested with short names (7 characters) and long names (27 characters). The long names doubled the average read time (FDate$= mm.Info(MODIFIED FName$)), which I don't find unusual.

I assume that MM.INFO(FILESIZE file$) works similarly, but I haven't tested it.

As I said, this all surprised me a bit, and I'm glad to now have an explanation for the behavior in FM. The reason for the behavior of the MM.Info function remains a mystery, however.

Kind regards
Michael
Edited 2025-09-19 21:03 by twofingers
‚My name is Ozymandias, king of kings
Look on my works, ye Mighty, and despair!‘
Nothing beside remains. Round the decay
Of that colossal wreck, boundless and bare
The lone and ...
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026