Jump to content

FileOpenDialog is slow to return


Slym
 Share

Recommended Posts

Hi there,

There is something weird with FileSaveDialog. It takes approximately 8 seconds on my computer to return after clicking on OK.

When compiling this exact code it looks faster but I still have this slow behaviour on another compiled software (LinuxLive USB Creator).

$DEBUG_TIMER=TimerInit()
$source_file = FileOpenDialog("Please choose an ISO image of LinuxLive CD", "", "ISO / IMG / ZIP (*.iso;*.img;*.zip)", 1,"")
ConsoleWrite("It took "&Round(TimerDiff($DEBUG_TIMER)/1000,1)&" seconds to select ISO")

Do you know what could cause this ?

Thank you for your help

 

PS : I'm still looking for AutoIT devs to help me on LinuxLive USB Creator. If interested, please contact me.

Edited by Slym

--------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] ---------------------

Link to comment
Share on other sites

The delay is not only because the timer is before. Even if you take only 1 sec to click on OK, it will take approximately 8 seconds to return the value on my system (Win 8.1 x64 + SSD + 16 GB RAM ...). I had the same bug on my Windows 7 x64 with the same setup.

When you select an ISO there is a big lag. I isolated the code and I still have the same lag randomly.

Maybe something weird in AutoIT framework in this function ? Or it could be related to x64 versions ?

--------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] ---------------------

Link to comment
Share on other sites

  • Moderators

Slym,

Try turning off your AV scanner temporarily and see if the lag still exists then. ;)

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

Thanks for your answers. I tried disabling EVERYTHING on my pc (I stopped every other software and every service I could stop including Antivirus).

I retried and had the same lag.

Could you please retry to open a random file 10 times with the code in this post and see if you clearly see a lag between the moment you click on OK and the moment you see the return from consolewrite ?

PS: I tried to open a bug report but I could not login into Trac (Authentication information not available).

--------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] ---------------------

Link to comment
Share on other sites

  • Moderators

Slym,

The code works fine for me - no delays at all - so I remain convinced that the problem is something on your machines and not AutoIt. Besides, I believe that function is a simple call to the Windows API, so I doubt there is much AutoIt code involved at all. :)

As to Trac, you do not need to log in - only authorised people can do that in order to manage the Trac system. If you want to be identified as the author of the ticket, just make sure you add your name to the relevant field. But I warn you now that because it is not reproducable by others that it is likely to be closed pretty quickly with a "Works for me" response. ;)

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

This is a slow return for me as well:

$loadpath= fileopendialog("Load Control File", $g_cc_controlsavepath, "txt(*.txt)")

I think it has something to do with how my SSD and the function work together.  I remember from my past that those filedialogs would sometimes lockup for like 20 seconds when you would click the path history combo.  (That was just Windows, before I even knew of AutoIt)

You can make your own custom filedialog, that I'm pretty sure will avoid the delay.

example:

filedialog.png

Let me know if you want the code.

Edited by Xandy
Link to comment
Share on other sites

 

That looks awesome! Which graphical lib are you using? SDL? GDI?

 

 

SDL and your >UDF it's what I am familiar with.  : )

I ripped the font from Dragon Warrior 3 screenshots.

Edited by Xandy
Link to comment
Share on other sites

I ripped the font from Dragon Warrior 3 screenshots.  SDL and your UDF it's what I am familiar with.  : )

I sure would like to see it. I Actually tried doing a custom filedialog like that myself once, but I got lazy somewhere after I got file/folder rendering done ;)

But Slym said no so lets not go more off topic here. Post in Examples Scripts or in a PM? :)

Link to comment
Share on other sites

  • Moderators

Slym,

Have you tried using my ChooseFileFolder UDF? It does not use the standard dialog - perhaps it might be faster for you. ;)

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

  • Moderators

Slym,

Fine. Although as I believe the native function uses the Windows API, your request for a "low-level function" will only result in the same dialog appearing. I thought you might like to try the UDF and see if it was in fact the API that was causing your problems as the UDF does not use it. :)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...