March 28, 2024, 04:41:53 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


S-l-o-w loading

Started by Brian, June 17, 2020, 11:43:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

June 17, 2020, 11:43:53 AM Last Edit: June 17, 2020, 01:32:33 PM by Brian
Help! I don't know what's going on, but if I use OPENFILE the file loads at the speed it should do. But if I use FILEREQUEST, my programs go off into la-la land, and I sometimes get the "Not Responding" message on the window caption. But if I am patient, it eventually shows the FileOpen dialog

I'm using Windows 10 64-bit, all up to date

Thanks a lot for any ideas,

Brian

PS: By any chance, does IWB's FILEREQUEST use Windows' OpenFileName? If so, OpenFileName is slow, as well, but didn't used to be. If it does, which DLL does it reside in?

LarryMc

It uses GetOpenFileNameA which resides in commdlg.inc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

I had the same problem on one of my older programs.

Was:

dir = "C:\\Users\\Bill\\Music\\#MP3\\ABooks"
Spath = "C:\\Users\\Bill\\Music\\#MP3\\ABooks"
rtn = "Select Directory..."
if FolderRequest(0, rtn, dir, GETSTARTPATH, BIF_FLAGS)

Changed to:

IF FolderRequest(0, "Select Directory...", dir, Spath, BIF_FLAGS)
Now it seems to work fine.  Not sure what the problem was, since the Spath and GETSTARTPATH is the same, when it runs.

Bill
When all else fails, get a bigger hammer.

Brian

Well, I don't know! Booted up this morning, and first thing I did was try a program that used FILEREQUEST. It was Ok. Closed the program, re-compiled: Ok

Checked my emails; did the rounds on the internet of my favourite site

Went back to IWB, tried the program: Duh! It was slow again

So, I don't know what to say now

Brian

Andy

Brian,

Just out of interest, try adding the folder the program is in to Avast's exclude list.

I do that while I am working on a program.

Just an idea...

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Andy,

Done that already! After trying all sorts this morning, what does make a difference is turning Avast off completely. Works a treat then. Of course, I have turned it back on now
Just going to send a note to Vast, since all this started after the last May 5 update
Brian

Andy

Avast seems to be causing problems again.

Told you my Avast settings in a previous email, Anne's laptop is taking for ever to shut down (most of the time) - disable Avast and the problem goes away.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Brian,

Worth a try....

Add in to the start of your program

$use "Comctl32.lib"

Just read somewhere GetOpenFileNameA uses this lib file, and some report loading it at or near the start of a program can help?

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

June 18, 2020, 08:04:39 AM #8 Last Edit: June 18, 2020, 08:14:20 AM by Brian
Thanks, Andy, but no banana!

Thing is, when I use FILEREQUEST for the first time, it takes about 15 seconds for the dialog to come up. If I then close the dialog without loading anything, then try again, it comes up straight away

This smacks of the Avast feature that checks programs to see if they are safe. That also takes about 15 seconds to run, before it lets you know if the program is safe or not

It seems that Avast is doing something similar, but a "silent" check, and I don't know what to do about it. They have certainly broken something, but what, I don't know

Brian

Andy

Brian,

To prove it, if you do what I said before and add the program's folder path to Avast's exclude list then that should tell you one way or another.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Been there, done that. I already had the \iwbdev\projects folder as an exclusion, and even went as far as excluding the actual folder of the program, and then the file itself. No joy. Still think it is Avast

Brian

fasecero

Hey guys!

Brian,

I was searching the web and as you say it may be your antivirus.

If it's not your AV, Comdlg32.dll is a delay-loaded library, which means it doesn't load until you call getOpenFileName. Some suggest that the solution is to preload the DLL, but I cannot find nor remember exactly how, it was some c++ macro - something like that. You could you try calling some other function from the dll when your program start

InitCommonControls()

You can also try initializing the COM library

CoInitialize(0)

Brian

Gabriel, thanks for your birthday wishes, but May 7 seems such a long way ago now! And where have you been hiding?

Anyway, I tried both your suggestions, but no difference

All my IWB projects are in C:\Users\Public\Documents\IWBasic\projects, which has always worked for me

However, this morning, I copied my latest program's folder into C:\Program Files (x86)\iwbdev. After Avast ran a check on the file (which is normal), it worked perfectly. So I went back to the original folder, tried that and it was slow. So back to the new folder, and it was all OK

All I can think is that Avast is treating the C:\Users\Public\Documents\IWBasic\projects folder as a Protected folder

So I might just starting using the C:\Program Files (x86)\iwbdev folder as my working folder, add a new Projects folder, and set an exception in Avast for the new Projects folder

Of course, if Avast get their act together, I wouldn't have to do that

Brian

aurelCB

Oh man...yes it is your Avast..
so Brian my friendly suggestion to you ,remove Avast and download and try free Kaspersky 
AV..you might be surprised.
all best

Brian

Aurel,

I am not too sure about Kaspersky. There are elements of its data gathering that are a bit dodgy, especially if you use their Cloud Protection or VPN

Meanwhile, after moving all my IWB programs, etc, to a new Projects folder within C:\Program Files (x86)\iwbdev, and instructing Avast to exclude scanning the folders inside, it is all going swimmingly well

Watch this space . . .

Brian

aurelCB

to be honest i don't trust to any of them
i only know that avast use too much resources,on this computer i use zone alarm which contain kaspersky 
so if is good for them then is for me to,i relly don't have any kind of av problems with Kasperky tools.
I tried most of them in the past

aurelCB

Brian and others read this:

Kaspersky doesn't talk much about its free antivirus product, and you might have a hard time finding the free Kaspersky software download page on the company's website. 
That's too bad, because Kaspersky Security Cloud Free is the best free antivirus product we've ever tested. We've never seen such a combination of excellent protection and extra features in a free antivirus program. 
It's got a bright, comprehensible interface, a lot of customization potential and Kaspersky's unbeatable malware protection. The program also lets you schedule scans, and its performance impact was so small that it actually sped up our test machine a bit. 
Kaspersky's useful extra features include a file shredder, an on-screen keyboard and an email scanner. The password manager and VPN service are fairly limited, however, unless you pay.

Brian

Aurel,

Thanks for that. I would have changed Avast, but my yearly subscription is active this month, so I am a bit too late. Although it gives me a year to see what else is out there

I read that the free VPN from Kaspersky is a bit limited, in that you don't get to choose your own VPN tunnel. In other words, it is set by Kaspersky

Brian