Pages: 1
Print
Author Topic: keep your desktop clean  (Read 4821 times)
gcrews
Member

Posts: 265


« on: October 24, 2011, 11:52:56 AM »

Today I figure out why XMetaL was sometimes hanging and being slow at times. At first I thought it was just the xml or maps and stuff I was working on. Turns out though, it was not.

Looks like XMetaL periodically cycles though all the files on your desktop every minute or so and when you switch windows and stuff.   Over time my desktop gets cluttered and I put many files on it. Specifically I had a large zip file with tons of files in it. Turns out this was causing XMetaL to lockup for 5-8 seconds quite often.

So the tip I have is to keep your desktop completely clear of files except shortcuts.


* desktop.png (23.54 KB, 719x508 - viewed 474 times.)
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2505



WWW
« Reply #1 on: October 24, 2011, 01:41:28 PM »

This is likely tied to the "Desktop" tab functionality in the Resource Manager. By default it lists all the files located on your Windows Desktop as the starting point.

An extreme example of this (being slow) might be to have a broken shortcut on your desktop that points to a network share or "My Network Places" item. Ultimately, a request is made to Windows to locate that and it could take a while for Windows Explorer to figure out it isn't reachable and time out.

For .zip files perhaps there is some Windows Explorer add-on being triggered in your case.

I'm not sure, but perhaps removing that tab would help:
//XMetaL Script Language JScript:
ResourceManager.RemoveTab("Desktop");
Logged
gcrews
Member

Posts: 265


« Reply #2 on: October 24, 2011, 03:34:02 PM »

Well it was more the 50MB+ zip files on my desktop that contained 10,000+files. It looks like XMetaL pools the directory information for all the folders on the desktop and with zipfldr.dll running on windows that includes the directory information for any zip file as well. Every time XMetaL pooled the desktop directories it went and read though the entire zip file manifests as well.

After I disabled windows zip folder support XMetaL stopped scanning the zip files (http://social.technet.microsoft.com/Forums/en-US/w7itprogeneral/thread/0b064013-fdc2-423d-8426-c714357bd786)

Even with the Desktop tab removed it still scans the desktop folders. At first I thought it pooled the directories every 60 seconds or so, but it looks like it’s when any file system activity occurs. For instance, I create a new text file in c:\ , I get about 200 event in ProcMon of XMetaL querying all the directories on my desktop. (1000’s if zip was still enabled) .

Even when I am browsing a different folder other than my desktop in the resource manager, XMetaL query’s every folder on the desktop anytime I create, modify, and delete a file somewhere on my hard drive.

Is that normal behavior from XMetaL or might it be a slight bug? Seem like it could affect a number of people, if you have any kind of source code zip or tar on your desktop it could potentially make XMetaL seem slow and briefly hang fairly often throughout the day. At first I thought it was related to the resource tab as well but now I think it might just be some rouge code somewhere in XMetaL that many not be necessary.

Running win 7 32bit, xmetal 6 sp1.


* 10-24-2011 2-30-06 PM.png (34.87 KB, 1042x123 - viewed 445 times.)
« Last Edit: October 24, 2011, 04:06:55 PM by gcrews » Logged
gcrews
Member

Posts: 265


« Reply #3 on: October 24, 2011, 05:05:25 PM »

Here is an example zip file to see the affect. All it has is 10,000 text files in it. Just put that file on your desktop and XMetaL will hang for about 10 seconds at times. I know the zip file may seem a bit extreme, but it’s not for us.  Our main compile results in a folder of html files and content of 10,000+ files witch often gets zipped and may be on the desktop, or someone may have a few zip copies of the DITA-OT, or a zip of the dita spec, or a src tar/zip of an application that has 1,000’s of files in one zip.

* test.zip (933.22 KB - downloaded 241 times.)
« Last Edit: October 25, 2011, 12:08:24 PM by gcrews » Logged
kwag_myers
Member

Posts: 69


« Reply #4 on: November 10, 2011, 03:07:54 PM »


I'm not sure, but perhaps removing that tab would help:
//XMetaL Script Language JScript:
ResourceManager.RemoveTab("Desktop");

Thanks, only I have no idea what to do with that code. Please advise.
Logged

XMetaL 6 Author in Windows 7 Home Premium
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2505



WWW
« Reply #5 on: November 10, 2011, 06:40:33 PM »

You can paste those two lines into an open document to test the script and see if it will help your particular setup. I was hoping it would, but it appears that is not the case.

If it did work then it would make sense for people in this situation to permanently hide that tab (assuming they don't use it) by creating an XMetaL startup macro ("application" macro). The Customization Guide and Programmer's Guide discuss macros and the events one might use them in.
« Last Edit: November 10, 2011, 06:53:31 PM by Derek Read » Logged
Pages: 1
Print
Jump to:  

email us