Bizzaro Posted January 8, 2016 Share Posted January 8, 2016 (edited) I created some software and I've been selling the first few copies. I use Windows 10 and the program runs like a dream, but upon changing compatibility to win 8 or win 7 the program becomes incredibly slow.I have no idea why though. The script is quite large, a few thousand lines so I can't post it. It simply automates various tasks for the user and has a simple interface.Is there any reason at all you can think of which would explain a slowdown on non-Win10 systems?It really is weird that this happens.Any ideas or help would be greatly appreciated. I'd say the script runs about 600% slower on non-win10 OS Edited January 8, 2016 by Bizzaro Link to comment Share on other sites More sharing options...
Trong Posted January 8, 2016 Share Posted January 8, 2016 You tried to run scripts on the physical computer or just testing with compatibility mode on Windows 10? Regards, Link to comment Share on other sites More sharing options...
Bizzaro Posted January 8, 2016 Author Share Posted January 8, 2016 (edited) I first found the problem happening for a customer and then managed to recreate it on my own system simply using the compatibility options. I'm trying compiling the program in several ways but no luck so far.Here are my includes and settings#RequireAdmin#Region ;**** Directives created by AutoIt3Wrapper_GUI ****#AutoIt3Wrapper_Icon=*****Deletedforprivacy#AutoIt3Wrapper_Outfile=*****Deletedforprivacy#AutoIt3Wrapper_Compression=4#AutoIt3Wrapper_Res_Fileversion=0.7.1.5#AutoIt3Wrapper_Add_Constants=n#AutoIt3Wrapper_Run_Tidy=y#AutoIt3Wrapper_Tidy_Stop_OnError=n#AutoIt3Wrapper_Run_Au3Stripper=y#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****#include <ListBoxConstants.au3>#include <ListViewConstants.au3>#include <FileConstants.au3>#include <StringConstants.au3>;~ #include <CheckSumVerify.au3>#include <KDMemory2.au3>#include <Array.au3>#include <Misc.au3>#include <WinAPI.au3>#include <GuiConstants.au3>#include <file.au3>#include <MsgBoxConstants.au3>#include <Math.au3>#include <ArrayMultiColSort.au3>#include <String.au3>#include <ButtonConstants.au3>#include <EditConstants.au3>#include <GUIConstantsEx.au3>#include <StaticConstants.au3>#include <WindowsConstants.au3>#include <GuiListView.au3>;~ #include <_SelfRename.au3> Edited January 8, 2016 by Bizzaro Link to comment Share on other sites More sharing options...
Trong Posted January 8, 2016 Share Posted January 8, 2016 I think you run the script under compatibility mode will not correct actual speed when running on the physical computer.When running in compatibility mode, the operating system will try to fool the program and it could cause slow program.So my advice is test run on a real machine and optimize your code!P/S: You can attach code to here. (it really that difficult) Regards, Link to comment Share on other sites More sharing options...
Bizzaro Posted January 8, 2016 Author Share Posted January 8, 2016 On the customer's computer it runs very very slowly too. I don't think it is an optimization problem because the program runs extremely fast on windows 10 where it was developed. I find it strange that using compatibility mode reproduces the slowdown too. Link to comment Share on other sites More sharing options...
Bizzaro Posted January 8, 2016 Author Share Posted January 8, 2016 When I compiled a 64bit version it was even slower Link to comment Share on other sites More sharing options...
Trong Posted January 8, 2016 Share Posted January 8, 2016 (edited) You know, if there is no code we can not know or find the problem to fix!If you can not posts full script, please just posts code snippet problem! Edited January 8, 2016 by Trong Regards, Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 8, 2016 Moderators Share Posted January 8, 2016 Bizzaro,What is "KDMemory2.au3"? What does it do?M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Trong Posted January 8, 2016 Share Posted January 8, 2016 (edited) Bizzaro,What is "KDMemory2.au3"? What does it do?M23Bot!*****Deletedforprivacy Edited January 8, 2016 by Trong Regards, Link to comment Share on other sites More sharing options...
Bizzaro Posted January 8, 2016 Author Share Posted January 8, 2016 (edited) It reads memory of active programs so we can automate windows tasks, why?EDIT - It is an old UDF and I had to edit it for errors. I'll try create a new script using only this UDF to see if this UDF causes problems in win7/8 Edited January 8, 2016 by Bizzaro Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 8, 2016 Moderators Share Posted January 8, 2016 Trong,Please calm down. I asked because it is the only UDF in that list that I do not recognise and I wonder if it might be dealing with something that Win10 does better than earlier OSes.Bizzaro,I have used Bowmore's Profiler UDF with some success to find out where scripts are "slow" - you might want to give it a try to see if you can pinpoint a specific section causing the slowdown.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Bizzaro Posted January 8, 2016 Author Share Posted January 8, 2016 You know, if there is no code we can not know or find the problem to fix!If you can not posts full script, please just posts code snippet problem!How can I post a snippet of the problem? I don't know what it is. The program is several thousand lines long without the UDF/includes. Link to comment Share on other sites More sharing options...
Bizzaro Posted January 8, 2016 Author Share Posted January 8, 2016 A bot? This is not malware. I deleted the name of the file for privacy since I have customers. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 8, 2016 Moderators Share Posted January 8, 2016 Bizzaro,Did you look at the "Profiler" UDF to which I linked above?M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Trong Posted January 8, 2016 Share Posted January 8, 2016 I mean "piece of code" or "paragraph code " or "small code" that you possible for problems having there!Else, please provide full script!As I said: if there is no code we can not know or find the problem to fix! Regards, Link to comment Share on other sites More sharing options...
Bizzaro Posted January 8, 2016 Author Share Posted January 8, 2016 I isolated the kdmemory2.au3 into a separate script which reads from the process memory. when I switched from win10 to win7 compatibility the program became much slower. I believe that this could be the problem but I have nothing to test it against really. Are there any other memory reading UDFs out there? Link to comment Share on other sites More sharing options...
JohnOne Posted January 8, 2016 Share Posted January 8, 2016 I isolated the kdmemory2.au3 into a separate script which reads from the process memory.Show that script. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 8, 2016 Moderators Share Posted January 8, 2016 Bizzaro,Looks like my guess was correct. Why do you need to read memory for this script to work? Please let us see the test script you created so we can see what you are trying to do.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Trong Posted January 8, 2016 Share Posted January 8, 2016 Are there any other memory reading UDFs out there?May be you need or I've misunderstood: https://www.autoitscript.com/forum/topic/78834-memory-udf/_WinAPI_ReadProcessMemory() _WinAPI_WriteProcessMemory() Regards, Link to comment Share on other sites More sharing options...
Bizzaro Posted January 8, 2016 Author Share Posted January 8, 2016 Thankyou fellas, i'll spend the weekend checking out these links. I don't have time right now but this looks great, I don't know why I ever used a third party memory reading UDF when autoit could do it anyway, thank you again. Hopefully this is the root of the problem. I'll update the thread once I have tested everything. Link to comment Share on other sites More sharing options...
Recommended Posts