Short: Calculate the total size of an Aminet index Author: peoyli@pluggnet.se (P-O Yliniemi) Uploader: peoyli pluggnet se (P-O Yliniemi) Type: util/misc Version: 1.4 Replaces: AIS.lha Architecture: m68k-amigaos Usage: AIS LISTNAME/A, SIZECOL/N LISTNAME - name of the list to add all sizes in SIZECOL - column with the size specifier ("K", "M" or "?") SIZECOL is optional, and defaults to column 34. Size: 1016 bytes! Still below 2 disk blocks! Requirements: An Amiga, stack can be as low as 1600 bytes (the program uses only 950 bytes of it, but the system can't set the stack to a lower value than 1600). At least 15K mem is required for proper operation. An Aminet index file (tested with RECENT and INDEX) or any other file in the same format ("K", "M" or "?" at column 36, size in columns 32-35, formatted as KKKK or M.M). ^^- Now selectable!!! Memory usage: Two modes of operation, depending on the amount of available memory. Loads the whole index into memory if possible. Both modes: 13464 bytes to display the requester at end Fast mode: (index size + stack + 1780 bytes) + 1600 bytes for the minimum stack (normally 4k) + 1852 bytes for the program and its data + a free mem block of at least the size of the index Slow mode: (stack + 1976 bytes) + 1600 bytes for the minimum stack (normally 4k) + 2048 bytes for the program and its data History: 1.4 - Added support for files up to 999M in size. Previous versions didn't support the size format xxM. Now the following size formats are supported: kkkkK 1234K (not used by Aminet) kkkK 123K, 12K, 3K 0.kM 0.9M (not used by Aminet) m.kM 1.2M mm.kM 75.2M (not used by Aminet) mmmM 123M (not used by Aminet - Yet) mmM 12M mM 1M (not used by Aminet) Inverted history :-). Size 1016 bytes. 1.3 - Changed default size column to 34. Released 13-Feb-96. Size 996 bytes. 1.2 - Low mem bug fix, added command line option, doesn't count lines beginning with '|'. Released 22-Jun-95. A new argument that allows you to specify at which column the size specifier is located. Size 1016 bytes. 1.1 - Rewritten in assembly language (800 times faster). Added version string. Released 15-Jun-95. Size: 936 bytes :-). 1.0 - Coded in ARexx, SLOW! Released 13-Jun-95. Size 3064 bytes :-(. Bugs: Doesn't support Aminet files larger than 99.9M (Aminet index file contains space for files up to 9.9M). Total size must be smaller than 429496729.5K (around 419430M or 409G). This is smaller than the limit for the previously released ARexx version. When Aminet is close this size, I will remove this limit (and decrease the precision of the calculations). No more than 4294967295 files can be added to the total size (Aminet is now about 17300 files). When Aminet is growing towards this limit (in about 90000 years or so), I will fix this bug. Speed: Tested with the Index file (30-May-95, 1175420 bytes, 16508 lines). See notes for each test below. |---------|-------|-----------|-----------|------|---------| | Version | Files | Size in K | Size in M | Time | Lines/s | |---------|-------|-----------|-----------|------|---------| | ARexx | 16499 | 2551349.2 | 2491.5 | 1610s| 10.2 | ¹) | Asm (F) | 16499 | 2541109.4 | 2481.5 | 2.00s| 8249.5 | ²) | Asm (S) | 16499 | 2541109.4 | 2481.5 |15.08s| 1094.1 | ³) |---------|-------|-----------|-----------|------|---------| | Asm (F) | 16499 | 2541109.4 | 2481.5 |19.34s| 853.1 | 68000 | Asm (S) | 16499 | 2541109.4 | 2481.5 |116.5s| 141.6 | 68000 |---------|-------|-----------|-----------|------|---------| ¹) The ARexx version was tested using Edge v1.704. The window with the file was as small as possible, all programs that could use up some CPU time was disabled (screenblankers etc.) The timing was done with a stop watch. ²) Asm (F) means that there was enough memory to buffer the whole file. Timing done using my own hardware-banging timer (not released - yet). The timer's precision is around 1/50s. ³) Asm (S) means SIMULATED low mem situation. The program will probably be slower in a real low mem situation. The program reads the file line by line when you're almost out of mem. ** All tests done with an A500+, VXL-030 33MHz/FPU 25MHz, 2M CHIP, 8M 16-bit mem, and 8M 32-bit mem (around 10.5 * A500). Results: (ftp.luth.se) 30-May-95: (ftp.uni-paderborn.de) 30-Jun-95: Files: 16499 Files: 16621 Size: 2541109.4K Size: 2543478.2K Size: 2481.5M Size: 2483.8M (ftp.uni-paderborn.de) 05-Jan-96: (ftp.doc.ic.ac.uk) 07-Feb-96: Files: 24692 Files: 25497 Size: 3915876.0K Size: 4163246.4K Size: 3824.0M Size: 4065.6M --------------------------------------------------------------------------- All kinds of freely distributable programs (new software...) are accepted as a contribution for this program. If you are a programmer, send me some of your own code. Contributions and bug reports for this program should be sent to: E-Mail: peoyli@pluggnet.se WWW: http://hotspot.pluggnet.se/~peoyli Snail Mail: Per-Olof Yliniemi Box 78 S-980 61 Tärendö SWEDEN ---------------------------------------------------------------------------