I am developing a procedure that uses the kd-tree to store a ramp palette to be used to draw in a colored using findstr. I have found as already mentioned in the forum a noticeable slowdown of execution with the size of the environment.
1) I did not understand if there are any workarounds discovered by someone to overcome these problems. I've seen that before placing the variables in alphabetical position they are accessed very quickly. It 's so?
2) I saw that representations of numbers in the batch are redundant and so I wanted to develop a procedure to represent a number with less use of the environment and possibly create a compressed structure with access still kind of random. For example with partial decompression that is not solid compression.
3) You could implement a kind of memory managment with garbace collection that uses the strings up to 8kb?
Code: Select all
@echo off& setlocal EnableDelayedExpansion&Goto :Init_System
Rem Tested on windows 7.
Rem Test1: Choose raster font 4x6 or 8x8, or Lucida console 10 or 6 whithout cleartype enable.
Rem Test2: Disabling ClearType and in System -> Advaced system Option -> Advanced ->
Rem Perfomance Configuration -> visual Effect and unselect "Smooth Edges of Screen Fonts" Check Box
Rem You may get this with LucidaConsole setting to 5
:: manual rainbow
call :color 04 "°±²Û" 4C "°±²Û" CE "°±²Û" EA "°±²Û" A2 "°±²Û" 21 "°±²Û" 15 "°±²Û" 50 "°±²Û"
:: ( Begin Color Function
) > $$$.color.txt && findstr /a:%~1 /f:$$$.color.txt "."
If ""=="%~1" Goto :Eof
:: ) End color Fuction
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
<nul set /p ".=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%" > "'"
:: Clearing all garbage
4) There is dithering?
Note: The character used are ALT+176, ALT+177, ALT+178, ALT+219 of the known 437 codepage. I edit in ANSI with notepad. I executed with codepage 850.