Jump to content

Script is very slow in non-Win10 OS like Win8/Win7


Recommended Posts

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 by Bizzaro
Link to comment
Share on other sites

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 by Bizzaro
Link to comment
Share on other sites

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

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

  • Moderators

Bizzaro,

What is "KDMemory2.au3"? What does it do?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 by Bizzaro
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

  • Moderators

Bizzaro,

Did you look at the "Profiler" UDF to which I linked above?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

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

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...