BarryG,
Can you test this for me ...
First create a file with this program,
after that, thy to open "MemoryGlobalVariablesTest.pbi" in the PB IDE,
It is only 40000 lines long with lots of variables ...
Load file 4min 05sec
Move mouse to a line you want to edit, and click left mouse button,
about 2min 15sec before any IDE reaction ...
I use now WIN10 Home, 16GB ram PB 5.71 LTS Final x64
Code: Select all
;----------------------------------------------------------------------------------------------------------------------------------
;- STARTUP ZONE
;----------------------------------------------------------------------------------------------------------------------------------
EnableExplicit
;----------------------------------------------------------------------------------------------------------------------------------
;- CONSTANTES ZONE
;----------------------------------------------------------------------------------------------------------------------------------
#pvg_TextLeft_b = %00000001
#pvg_TextCenter_b = %00000010
#pvg_TextRight_b = %00000100
#pvg_TextTop_b = %00010000
#pvg_TextMiddle_b = %00100000
#pvg_TextBottom_b = %01000000
;----------------------------------------------------------------------------------------------------------------------------------
#byte = 1
#word = 2
#long = 4
#integer = 4
#single = 4
#double = 8
#stringS = 128
#stringL = 256
;----------------------------------------------------------------------------------------------------------------------------------
;- GLOBALS ZONE
;----------------------------------------------------------------------------------------------------------------------------------
Global Counter.l
Global Quantity.l
;----------------------------------------------------------------------------------------------------------------------------------
;- INITS ZONE
;----------------------------------------------------------------------------------------------------------------------------------
Quantity = 10000 ;8000
;----------------------------------------------------------------------------------------------------------------------------------
;- MEMORY ZONE
;----------------------------------------------------------------------------------------------------------------------------------
Global *CommandBuffer = AllocateMemory (10000)
Global *DataBuffer = AllocateMemory (100000)
Global TestString.s = "This is a auto created test file string, so this is not importent at all ..."
;----------------------------------------------------------------------------------------------------------------------------------
If OpenFile (0, "MemoryGlobalVariablesTest.pbi")
; WriteStringN (0, ";============================================================================================")
; WriteStringN (0, ";- GLOBAL VARIABLES")
; WriteStringN (0, ";============================================================================================")
; WriteStringN (0, "")
WriteStringN (0, ";============================================================================================")
WriteStringN (0, ";- !!!!! THIS IS A NOT WORKING PROGRAM ... !!!!! ")
WriteStringN (0, ";- !!!!! THIS IS A TEST FILE ... !!!!! ")
WriteStringN (0, ";============================================================================================")
WriteStringN (0, "; !!!!! THIS IS NOT A COMPILER ERROR BUT IDE PROBLEM ... !!!!! ")
WriteStringN (0, ";============================================================================================")
WriteStringN (0, "")
;----------------------------------------------------------------------------------------------------------------------------------
WriteStringN (0, "#byte = 1")
WriteStringN (0, "#word = 2")
WriteStringN (0, "#long = 4")
WriteStringN (0, "#integer = 4")
WriteStringN (0, "#single = 4")
WriteStringN (0, "#double = 8")
WriteStringN (0, "#stringS = 128")
WriteStringN (0, "#stringL = 256")
;----------------------------------------------------------------------------------------------------------------------------------
;==================================================================================================================================
;- MEMORY ZONE
;----------------------------------------------------------------------------------------------------------------------------------
;*CommandBuffer = AllocateMemory (10000) ; 10000 Bytes = +-10 KB
WriteStringN (0, "Global *DataBuffer = AllocateMemory (100000)
;----------------------------------------------------------------------------------------------------------------------------------
;- BYTE MEMORY
;----------------------------------------------------------------------------------------------------------------------------------
WriteStringN (0, "Global *pvg_Container_Setup_" + StrU (0, #PB_Word) + "_Byte = *DataBuffer")
For Counter = 1 To Quantity
WriteStringN (0, "Global *pvg_Container_Setup_" + StrU (Counter, #PB_Word) + "_Byte = *pvg_Container_Setup_" + StrU (Counter-1, #PB_Word) + "_Byte + #byte")
Next Counter
;----------------------------------------------------------------------------------------------------------------------------------
;- WORD MEMORY
;----------------------------------------------------------------------------------------------------------------------------------
WriteStringN (0, "")
WriteStringN (0, "Global *pvg_Container_Setup_" + StrU (0, #PB_Word) + "_Word = *pvg_Container_Setup_" + StrU (Counter-1, #PB_Long) + "_Byte + #word")
For Counter = 1 To Quantity
WriteStringN (0, "Global *pvg_Container_Setup_" + StrU (Counter, #PB_Word) + "_Word = *pvg_Container_Setup_" + StrU (Counter-1, #PB_Long) + "_Word + #word")
Next Counter
;----------------------------------------------------------------------------------------------------------------------------------
;- LONG MEMORY
;----------------------------------------------------------------------------------------------------------------------------------
WriteStringN (0, "")
WriteStringN (0, "Global *pvg_Container_Setup_" + StrU (0, #PB_Word) + "_Long = *pvg_Container_Setup_" + StrU (Counter-1, #PB_Long) + "_Word + #long")
For Counter = 1 To Quantity
WriteStringN (0, "Global *pvg_Container_Setup_" + StrU (Counter, #PB_Word) + "_Long = *pvg_Container_Setup_" + StrU (Counter-1, #PB_Long) + "_Long + #long")
Next Counter
;----------------------------------------------------------------------------------------------------------------------------------
;- STRING MEMORY
;----------------------------------------------------------------------------------------------------------------------------------
WriteStringN (0, "")
WriteStringN (0, "Global *pvg_Container_Setup_" + StrU (0, #PB_Word) + "_String = *pvg_Container_Setup_" + StrU (Counter-1, #PB_Long) + "_Long + #stringS")
For Counter = 1 To Quantity
WriteStringN (0, "Global *pvg_Container_Setup_" + StrU (Counter, #PB_Word) + "_String = *pvg_Container_Setup_" + StrU (Counter-1, #PB_Long) + "_Long + #stringS")
Next Counter
WriteStringN (0, "")
WriteStringN (0, "")
WriteStringN (0, "Debug *DataBuffer")
WriteStringN (0, "")
WriteStringN (0, "Debug *pvg_Container_Setup_10000_Byte")
WriteStringN (0, "Debug *pvg_Container_Setup_10000_Word")
WriteStringN (0, "Debug *pvg_Container_Setup_10000_Long")
WriteStringN (0, "Debug *pvg_Container_Setup_10000_String")
WriteStringN (0, "")
WriteStringN (0, "Debug *pvg_Container_Setup_10000_String - *DataBuffer")
CloseFile (0)
EndIf
thanks,
marc