Zeus Hangs for 15 seconds when its window is selected

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
jmasles
Posts: 11
Joined: Tue Aug 30, 2016 10:21 pm

Zeus Hangs for 15 seconds when its window is selected

Post by jmasles » Wed Aug 31, 2016 6:09 pm

Just updated to 3.98f under windows 7 and my workspace is on a linux system. If I have the built-in ctags builder enabled and have a file from the network share opened in the editor it can take 15 seconds to switch focus back to that window during which time it's displaying a "not responding" message in the title bar. If I disable the built in tags builder, then when I switch focus away from Zeus and back to it, the hang is only about 6 seconds. Finally with the tags builder disabled and no open file, the hang is about 4 seconds. I had previously used an ~ year old version that didn't have these issues at least not as noticeably ( file version reported as 3.98.16.0 ). I do have to disable all automatic tags generation (even on the older version) as the editor will hang for 30 to 45 seconds if I save a single file with automatic tag generation turned on.

jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jussij » Thu Sep 01, 2016 4:23 am

When Zeus gets activate it does a check of all the files currently open to see if anything has changed and for that check it needs to get details from the file system for each file.

So it sounds like Zeus is having a bit of trouble accessing those file details for any file found on the shared network :?

I will take a look at the code and see if I can isolate a possible culprit.

For the file share are you using Samba :?:

Cheers Jussi

jmasles
Posts: 11
Joined: Tue Aug 30, 2016 10:21 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jmasles » Thu Sep 01, 2016 5:03 am

Alas it's a large corporate network and I have no visibility into the hardware on the other end ... Thanks for looking into this though.

jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jussij » Thu Sep 01, 2016 9:01 am

Could you try the following test.

1. Download the test executable found here: http://www.zeusedit.com/z300/file_test.zip

2. Extract the file_test.exe file contained to the c:\temp folder

3. Start Zeus

4. Open a network file in Zeus and make it the active file

5. Use the Tools, DOS Command Line menu and run this command:

Code: Select all

c:\temp\file_test.exe "$fn"
That command should produce output similar to this:

Code: Select all

Start: checkForChange
   Start: lockCheck
        Duration: 0 sec
   End: lockCheck

   Start: lockedEx
        Duration: 0 sec
   End: lockedEx

End: checkForChange

Start: checkForFileChange
End: checkForFileChange

Testing File: D:\Projects\Zeus IDE\Apollo\zfwmdi01.cpp
 Total Duration: 0 sec

jmasles
Posts: 11
Joined: Tue Aug 30, 2016 10:21 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jmasles » Thu Sep 01, 2016 11:40 pm

The times produced by the test appear quite reasonable. I tried an
experiment where I had the same file open in notepad++ and then switched
window focus between it and firefox. The switch was virtually
instantaneous in either direction, so I tried with Zeus and firefox. The
same pattern as before repeated itself, instantaneous switch to firefox,
a 6 second hang when switching to Zeus.

Here are the results of the test you asked for, and thanks for looking into this:

Code: Select all

---------------------------------------------------------------------------
       Zeus - Version 3.98f
       Copyright (c) Xidicone P/L 1993-2016.  All rights reserved.
---------------------------------------------------------------------------

Start: checkForChange
    Start: lockCheck
         Duration: 0.015 sec
    End: lockCheck

    Start: lockedEx
         Duration: 0 sec
    End: lockedEx

End: checkForChange

Start: checkForFileChange
End: checkForFileChange

Testing File:
M:\raid-r07-branch\sandboxes\src\slammer\raid\Sidrat\SysUtils\HdwrMode.cpp
  Total Duration: 0.015 sec

jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jussij » Fri Sep 02, 2016 12:08 am

The results show the problem is not related Zeus trying to access the file.

So that must mean it is definitely all Zeus workspace related.

Could you repeat your Zeus/Firefox test as follows:

1. Do the test with the Zeus workspace open and one file open from that workspace.

2. Do the test with the same file open but with the Zeus workspace closed.

I would expect the second test to work without problems.

Cheers Jussi

jmasles
Posts: 11
Joined: Tue Aug 30, 2016 10:21 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jmasles » Fri Sep 02, 2016 12:18 am

And right you are, without an opened workspace, switching between windows is immediate. Should I nuke this workspace and start over ?

thx,
John.

jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jussij » Fri Sep 02, 2016 12:36 am

Code: Select all

Should I nuke this workspace and start over?
There should be an easier fix.

There is definitely a bug somewhere in the ctags database code attached to the workspace, which can result in a slow down.

The hard part is identifying the cause. I've seen it maybe twice and it has been reported a handful of times :?

But the fix should be as simple as using the Tags, Rebuild menu to recreate the ctags database.

Cheers Jussi

jmasles
Posts: 11
Joined: Tue Aug 30, 2016 10:21 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jmasles » Fri Sep 02, 2016 10:04 pm

I had previously disabled tagging as it was making things worse, but I went back and enabled it and rebuilt the tags db. As far as I can tell that had no effect on the time lag between switching windows. Turning the tag db off does improve things marginally ( maybe a second or two faster, but the switch still takes ~7 seconds ). One interesting thing, with the tags db turned off, when I start up Zeus I see the message about loading the workspace and the ctags database for about 15 seconds, then in the next few seconds it loads up the files and becomes ready ( about ~22 total ).

jmasles
Posts: 11
Joined: Tue Aug 30, 2016 10:21 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jmasles » Fri Sep 02, 2016 10:50 pm

I reverted back to my previous version (3.97w) and there are no hangs on switching windows. When I recently upgraded I followed the instructions and applied the zConfig files from 3.97w over the top of 3.98f. Could it be that given the disparity in versions that just doesn't work properly ?

jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jussij » Sat Sep 03, 2016 1:06 am

Could it be that given the disparity in versions that just doesn't work properly ?
That could be an issue :?

To test this I would do the following:

1. If you have not done so already make a full backup of this folder:

Code: Select all

C:\Users\<Your User Id>\AppData\Roaming\Xidicone\Zeus
If you then delete that folder, when you run the re-run the latest Zeus installer it will recreate that folder with the new settings.

But after making that backup and before deleting that folder and re-running that installer could you also do the following.

1. Open your workspace and right click on the top workspace node an in the popup menu you will see an option to Copy Name(s) to Clipboard.

Copy and paste that name back into a new document.

That will give you a full file name with a .zwi extension.

2. Repeat that same process for all the projects in the workspace.

That will give you a full file name with a .zpi extension.

3. Go to this folder:

Code: Select all

C:\Users\<Your User Id>\AppData\Roaming\Xidicone\Zeus\zTags
In this folder you should find a .zdb file for each of the .zpi files in your workspace from above.

Those are the ctags database files for each of the project in the workspace.

If you bundle all those files into a zip and send them to me I will see if I can replicate the slowdown at this end.

At my end initially the workspace will not open correctly as I will not have any of the source files for that workspace.

But that is ok as I can easily fake this by just creating a set of dummy source files.

I know you wouldn't, but don't send me any of those source files :!:

And before sending through that zip file also do this test:

With Zeus not running delete this folder:

Code: Select all

C:\Users\<Your User Id>\AppData\Roaming\Xidicone\Zeus\zTags
Start Zeus, Open the workspace and you should see Zeus recreating all those ctags database files.

That is what the tags rebuild should have done, but just in case it didn't those files would now be fully re-created.

One final thing you could try is all the other versions since 397w which can be found here:

http://www.zeusedit.com/z300/ze32r397z.zip
http://www.zeusedit.com/z300/ze32r398b.zip
http://www.zeusedit.com/z300/ze32r398c.zip
http://www.zeusedit.com/z300/ze32r398d.zip
http://www.zeusedit.com/z300/ze32r398e.zip

I would install each in it's own folder (i.e zeus3.97z, zeus3.98a, ....., zeus3.98e).

All those version are tagged in the source control so knowing which version caused your issue would narrow down the change set.

Cheers Jussi

jmasles
Posts: 11
Joined: Tue Aug 30, 2016 10:21 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jmasles » Tue Oct 24, 2017 6:13 pm

I finally had time to try a newer version (I had switched back to 3.97w to get some work done and have now loaded 3.98f) and had the same problem. I followed the instructions and wiped out the Xidicone\Zeus directory along with the installed version and reinstalled. I created a new workspace from scratch and now have a focus switch time of just a bit over 3 seconds. I also tried my older workspace files and that was about 5 seconds ( but the .zdb file was stored on the share in that configuration and that may have had something to do with the extra 2 seconds ). I did these tests with automatic tagging disabled, I turned it back on and it may have made a slight difference ( 1/2 a second ), but that could also be network loading.

jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jussij » Tue Oct 24, 2017 10:41 pm

have now loaded 3.98f
Zeus is now at version 3.98l :wink:
I created a new workspace from scratch and now have a focus switch time of just a bit over 3 seconds.
This is very strange since I would have not expected any code changes in this area between those two version of Zeus :?

The only thing that has changed is the C++ compiler used to build the Zeus executable, which in turn would have changed the C runtime.

What I will do is create a new Zeus beta version that adds in some tracing so we can see where Zeus is spending it's time.

Watch this space as that beta should be ready shortly.

Cheers Jussi

jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jussij » Wed Oct 25, 2017 2:08 am

To try and identify the cause of this time delay could you do the following:

1. Download the Zeus beta version found here: http://www.zeusedit.com/z300/z-beta.zip

2. Start Zeus and paste this text into a Zeus File, New window:

Code: Select all

"$zud\ZeusErr.log"
3. Select that line of text and use the View, Open File menu to open that log file.

3. Truncate the log file.

4. Use the Tools, DOS Command Line menu and run this command:

Code: Select all

zeus.exe -s -t
5. Replicate the slow down.

6. Inspect the log file to see which Workspace action is causing the delay.

Cheers Jussi

jmasles
Posts: 11
Joined: Tue Aug 30, 2016 10:21 pm

Re: Zeus Hangs for 15 seconds when its window is selected

Post by jmasles » Thu Oct 26, 2017 9:59 pm

Well that was short lived, from yesterday to today the window focus switch time has jumped from 3.5 seconds to 35 seconds on the same Workspace. To my knowledge the network is unchanged, and after making a few edits last night I left Zeus running overnight.

I've attached the log file, the first section is the Zeus startup and shows the long Workspace load time at 14:43:22. The second section is from my switching focus away from Zeus and then back again. The delay for Workspace load is similar at 14:44:35 in the log.

thx,
John.
Attachments
ZeusErr.zip
Error log output
(1.49 KiB) Downloaded 3 times

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 2 guests