Slow Startup

Discussion Forums discussion Slow Startup

This topic contains 0 voices and has 14 replies.

Viewing 15 posts - 1 through 15 (of 15 total)
Author Posts
Author Posts
September 28, 2009 at 8:06 am #699

Pich
Member

Hi to all,

i’ve noticed a problem with programmer’s notepad.

I have version 2.0.10.1010, but I’ve noticed this in earlier versions too.

I’m using it on Windows XP professional.

Sometimes happens that the startup of the programmers notepad is sloooow ( one minute or two on a P4 3 GHz – 1GB RAM ) and I don’t know how to fix this.

Months ago I’ve completely cleaned all references of the program in the registry and in the new installation all went ok ( few milliseconds and the programmers notepad was up ). After a while something happened and the startup became surprisingly slow…

Any idea?

Thank you

Pich

September 29, 2009 at 6:40 pm #16785

simon
Key Master

Hi, I’d definitely like to work out what this is to avoid it happening in the future. I’m not sure what might be causing it. The first thing to try is removing things from the user settings directory:

Vista/7: c:usersyour_user_nameappdataroamingecho softwarepn2

XP: c:documents and settingsyour_user_nameapplication dataecho softwarepn2

Here are what the files mean:

*.acd: Autocomplete history files

*.cscheme: Compiled scheme details, delete these and they’ll be recreated next run

installClipCache.xml: Text clip details, will be recreated from defaults but you’ll lose any customisations

toolbar.dat: Toolbar configuration

I can’t think what would be causing the slowdown here, but try this and see if that helps. If not, we’ll look at other options.

Out of interest do you have any extensions installed, like PyPN?

September 30, 2009 at 12:31 pm #16786

Pich
Member

Hi,

thank you for your answer. I’ve unistalled PN2, I’ve completely deleted the folder:

c:documents and settingsyour_user_nameapplication dataecho softwarepn2

I’ve downloaded the latest stable version of PN2 and I’ve installed it.

No change. Several seconds ( 30 seconds ) in program startup and CPU load at maximum.

No other extensions are installed. Maybe there can be some problems in interactions between PN2 and windows API…but it’s only an idea…

Thank you

Pich

October 12, 2009 at 9:15 am #16787

gnom1gnom
Member

It seems that I have the same problem – http://pnotepad.org/forums/topic/687.

October 12, 2009 at 4:29 pm #16788

simon
Key Master

Is it the same? Does your PN start after 30 seconds or just stay stopped? Finally, if I make a custom build of PN that ouputs some timing information would either of you help by running it and uploading the results?

October 12, 2009 at 7:07 pm #16789

gnom1gnom
Member

This issue started suddenly – I installed Windows 7 Ultimate x64 from scratch and as usual installed PN (2.0.10.1010). Than suddenly it started happening – I don’t recall installing any new program or update.

I deleted c:usersyour_user_nameappdataroamingecho softwarepn2 as you suggested, but it doesn’t help. Disabling CTags doesn’t help too.

Here’s PN’s stack:

ntoskrnl.exe!SeAccessCheckWithHint+0xb4a

ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0×682

ntoskrnl.exe!KeWaitForSingleObject+0x19f

ntoskrnl.exe!PsIsSystemProcess+0×68

ntoskrnl.exe!KeStackAttachProcess+0x11b9

ntoskrnl.exe!ObReferenceObjectByPointerWithTag+0x22b

kernel32.dll!SortCloseHandle+0x2db8

kernel32.dll!GetDurationFormatEx+0xd8ce

kernel32.dll!RegOpenKeyExW+0×497

KERNELBASE.dll!CompareStringEx+0×52

KERNELBASE.dll!CompareStringW+0×38

ntdll.dll!RtlInitializeCriticalSectionEx+0xdf

ntdll.dll!RtlUniform+0×28

ntdll.dll!RtlInitializeCriticalSection+0×12

KERNELBASE.dll!FindCloseChangeNotification+0×69

KERNELBASE.dll!FindFirstFileExW+0×515

KERNELBASE.dll!CompareStringEx+0×52

October 13, 2009 at 1:20 pm #16790

simon
Key Master

Hmm, ok so we’re not showing any PN code there. I’m not sure if that’s because we’re not in PN yet or because there are no symbols for pn.exe. Would you mind trying with the PDB files from here:

http://pnotepad.googlecode.com/files/pdb20101010.zip

Just drop the files into the PN directory so that pn.pdb is in the same place as pn.exe and try Process Explorer again. If this doesn’t help then I’ll keep working on a custom build to track down the problem.

Thanks for your help in diagnosing this!

October 13, 2009 at 3:42 pm #16791

gnom1gnom
Member

I copied the pdb files.

The stack changes during startup – I tried to copy it as fast as I can (I had managed to do it couple of times before PN showed up):

ntoskrnl.exe!SeAccessCheckWithHint+0xb4a

ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0×682

ntoskrnl.exe!KeWaitForSingleObject+0x19f

ntoskrnl.exe!PsIsSystemProcess+0×68

ntoskrnl.exe!KeStackAttachProcess+0x11b9

ntoskrnl.exe!ObReferenceObjectByPointerWithTag+0x22b

AcXtrnal.DLL+0x9e7a

KERNELBASE.dll!CreateFileW+0x3e8

ntdll.dll!RtlInitUnicodeString+0×164

ntdll.dll!RtlAllocateHeap+0xac

ntdll.dll!RtlValidateHeap+0xbb

AcXtrnal.DLL+0xa25d

ntdll.dll!RtlFreeHeap+0x7e

AcXtrnal.DLL+0xa25d

ntdll.dll!RtlGetGroupSecurityDescriptor+0xf3

ntdll.dll!RtlValidateHeap+0xa0

ntdll.dll!RtlImageNtHeader+0x73a

ntdll.dll!RtlUniform+0×28

AcXtrnal.DLL+0×9480

KERNELBASE.dll!FindCloseChangeNotification+0×69

ntoskrnl.exe!SeAccessCheckWithHint+0xb4a

ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0×682

ntoskrnl.exe!KeWaitForSingleObject+0x19f

ntoskrnl.exe!PsIsSystemProcess+0×68

ntoskrnl.exe!KeStackAttachProcess+0x11b9

ntoskrnl.exe!ObReferenceObjectByPointerWithTag+0x22b

AcXtrnal.DLL+0x9e7a

KERNELBASE.dll!CreateFileW+0x3e8

ntdll.dll!RtlInitUnicodeString+0×164

ntdll.dll!RtlAllocateHeap+0xac

ntdll.dll!RtlValidateHeap+0xbb

AcXtrnal.DLL+0xa25d

ntdll.dll!RtlFreeHeap+0x7e

AcXtrnal.DLL+0xa25d

ntdll.dll!RtlGetGroupSecurityDescriptor+0xf3

ntdll.dll!RtlValidateHeap+0xa0

ntdll.dll!RtlImageNtHeader+0x73a

ntdll.dll!RtlUniform+0×28

AcXtrnal.DLL+0×9480

KERNELBASE.dll!FindCloseChangeNotification+0×69

ntoskrnl.exe!SeAccessCheckWithHint+0xb4a

ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0×682

ntoskrnl.exe!KeWaitForSingleObject+0x19f

ntoskrnl.exe!PsIsSystemProcess+0×68

ntoskrnl.exe!KeStackAttachProcess+0x11b9

ntoskrnl.exe!ObReferenceObjectByPointerWithTag+0x22b

AcXtrnal.DLL+0x9e7a

KERNELBASE.dll!CreateFileW+0x3e8

ntdll.dll!RtlInitUnicodeString+0×164

ntdll.dll!RtlAllocateHeap+0xac

ntdll.dll!RtlValidateHeap+0xbb

AcXtrnal.DLL+0xa25d

ntdll.dll!RtlFreeHeap+0x7e

AcXtrnal.DLL+0xa25d

ntdll.dll!RtlGetGroupSecurityDescriptor+0xf3

ntdll.dll!RtlValidateHeap+0xa0

ntdll.dll!RtlImageNtHeader+0x73a

ntdll.dll!RtlUniform+0×28

AcXtrnal.DLL+0×9480

KERNELBASE.dll!FindCloseChangeNotification+0×69

ntoskrnl.exe!SeAccessCheckWithHint+0xb4a

ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0×682

ntoskrnl.exe!KeWaitForSingleObject+0x19f

ntoskrnl.exe!PsIsSystemProcess+0×68

ntoskrnl.exe!KeStackAttachProcess+0x11b9

ntoskrnl.exe!ObReferenceObjectByPointerWithTag+0x22b

kernel32.dll!RegOpenKeyExW+0x5db

kernel32.dll!RegOpenKeyExW+0×497

KERNELBASE.dll!CompareStringEx+0×52

KERNELBASE.dll!CompareStringW+0×38

ntdll.dll!RtlInitializeCriticalSectionEx+0xdf

ntdll.dll!RtlUniform+0×28

AcXtrnal.DLL+0×9480

KERNELBASE.dll!FindCloseChangeNotification+0×69

Notice that this line is at the bottom of each stack state: KERNELBASE.dll!FindCloseChangeNotification+0×69.

Hope this helps!

October 13, 2009 at 4:57 pm #16792

simon
Key Master

What’s very strange here is that these stacks don’t look like they include any code running actually in PN.exe or any of the wow64.dll or similar references I’d expect to see on a 64-bit OS. PN doesn’t call FindCloseChangeNotification anywhere internally, so it doesn’t look like it’s directly PN that’s causing it. I also don’t see any references to AcXtrnal.dll when using PN on my system.

That being said I’ll see if I can produce something with some debug output to help track the cause down.

Finally, I presume that you’re starting PN just by double-clicking on a shortcut or similar?

October 14, 2009 at 10:44 am #16793

gnom1gnom
Member

AcXtrnal.dll was there because I tried running PN is XP compatible mode before and I forgot to switch this option off.

Here is the stack trace without this option:

ntoskrnl.exe!SeAccessCheckWithHint+0xb4a

ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0×682

ntoskrnl.exe!KeWaitForSingleObject+0x19f

ntoskrnl.exe!PsIsSystemProcess+0×68

ntoskrnl.exe!KeStackAttachProcess+0x11b9

ntoskrnl.exe!ObReferenceObjectByPointerWithTag+0x22b

KERNELBASE.dll!OpenRegKey+0x236c

KERNELBASE.dll!OpenRegKey+0×2536

KERNELBASE.dll!CompareStringEx+0xe

KERNELBASE.dll!CompareStringW+0×38

ntdll.dll!RtlInitializeCriticalSectionEx+0xdf

ntdll.dll!RtlInitializeCriticalSection+0×12

KERNELBASE.dll!FindCloseChangeNotification+0×69

KERNELBASE.dll!FindFirstFileExW+0×515

KERNELBASE.dll!CompareStringEx+0×52

ntoskrnl.exe!SeAccessCheckWithHint+0xb4a

ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0×682

ntoskrnl.exe!KeWaitForSingleObject+0x19f

ntoskrnl.exe!PsIsSystemProcess+0×68

ntoskrnl.exe!KeStackAttachProcess+0x11b9

ntoskrnl.exe!ObReferenceObjectByPointerWithTag+0x22b

KERNELBASE.dll!OpenRegKey+0x236c

KERNELBASE.dll!OpenRegKey+0×2536

KERNELBASE.dll!CompareStringEx+0xe

KERNELBASE.dll!CompareStringW+0×38

ntdll.dll!RtlInitializeCriticalSectionEx+0xdf

ntdll.dll!RtlInitializeCriticalSection+0×12

KERNELBASE.dll!FindCloseChangeNotification+0×69

KERNELBASE.dll!FindFirstFileExW+0×515

KERNELBASE.dll!CompareStringEx+0×52

ntoskrnl.exe!SeAccessCheckWithHint+0xb4a

ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0×682

ntoskrnl.exe!KeWaitForSingleObject+0x19f

ntoskrnl.exe!PsIsSystemProcess+0×68

ntoskrnl.exe!KeStackAttachProcess+0x11b9

ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0x88d

ntoskrnl.exe!KeWaitForSingleObject+0x19f

win32k.sys!memset+0x7a27

win32k.sys!memset+0x7ac9

win32k.sys!memset+0x60f4

win32k.sys!memset+0x61f9

win32k.sys!memset+0x7bf5

ntoskrnl.exe!KeSynchronizeExecution+0x3a43

wow64win.dll+0x3fc2a

wow64win.dll+0x1ac48

wow64.dll!Wow64SystemServiceEx+0xd7

wow64cpu.dll!TurboDispatchJumpAddressEnd+0×24

wow64.dll!Wow64SystemServiceEx+0x1ce

wow64.dll!Wow64LdrpInitialize+0×429

ntdll.dll!RtlResetRtlTranslations+0x1b08

ntdll.dll!RtlResetRtlTranslations+0xc63

ntdll.dll!LdrInitializeThunk+0xe

USER32.dll!DispatchMessageW+0x5c

pn.exe+0×64627

I’m not sure if the last one appeared just before PN opened or just after…

Yes I open PN by double-clicking.

October 30, 2009 at 1:16 pm #16794

gnom1gnom
Member

Hi,

do you have any news about this issue? Is there anything I can do to help you out?

February 21, 2010 at 12:55 pm #16795

PJani
Member

Slow start problem i had for very long time.

I found what is causing these slow starts…

On desktop i had one very large archive(in number of files) .zip “archive of boost”.

I used procmon.

For some very weard reason, pn starts to read all files in that archive. I renamed that archive .zip to .zip_ and PN started to work fine.

I hope this helps.

February 22, 2010 at 11:20 am #16796

simon
Key Master

Ah, excellent diagnosis! I wonder if this was caused by the File Browser, perhaps checking if the ZIP file has files/subfolders so can be expanded. This is something to look at!

March 10, 2010 at 6:38 pm #16798

tgwizard
Member

Yes, the same thing happens to me (Windows 7 64 bits). I had a ~150 MB .zip file on my desktop (with lots of small files in it), and it took about 2 min for PN to start. When I moved it to my User folder, it starts immediately.

April 1, 2010 at 10:25 pm #16799

simon
Key Master

Just a quick note to say I’ve fixed this for the next release.

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.