Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic freezing after upgrading to 6.6.1 #1659

Open
maphew opened this issue Nov 5, 2024 · 14 comments
Open

Periodic freezing after upgrading to 6.6.1 #1659

maphew opened this issue Nov 5, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@maphew
Copy link
Contributor

maphew commented Nov 5, 2024

Problem to Solve

Since installing 6.6.1 release Onenote freezes for a few seconds every few minutes. Downgrading to the version I was on previously, 6.5.2, made the problem go away.

Environment (if applicable)

  • OneNote 16.0.18129.20116 (version 2410, Microsoft 365 Apps for Enterprise)

Additional Context

Scanning the logfile, it appears the freeze ups may coincide with hashtag service scanning. I'm not sure about though since hashtag scanning also occurs with 6.5.2. I seem to recall a similar thing happening a year or two ago with a particular release.

01|02:23:36.059| Starting dllhost 47252, 3000 Mhz, 64 MB, en-US/en-US, v6.5.2, OneNote 15.0, Office 16.0, 2024-11-05 14:23
01|02:23:36.061| ..Windows 10 Enterprise, Version 22H2, Build 19041, 64 bit
01|02:23:36.074| ..C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE (16.0.18129.20116)
01|02:23:36.091| ..OnConnection(ConnectionMode:ext_cm_Startup,custom[1:Int32])
01|02:23:36.091| ..OneAddInsUpdate(custom[])
01|02:23:36.808| ..building ribbon
01|02:23:36.813| ..building ribbon colorizer commands
01|02:23:37.165| ..building ribbon language proofing commands
01|02:23:37.170| ..building ribbon groups
01|02:23:37.172| ..building context menu
01|02:23:37.316| ..OnStartupComplete(custom[])
01|02:23:37.319| ..starting command service
01|02:23:37.320| ..starting reminder service
01|02:23:37.325| ..starting navigation service
01|02:23:37.869| ..starting hashtag service, Ready
01|02:23:37.870| ..ready
09|02:23:37.873| hashtag service waiting, Ready
10|02:23:37.876| Running command UpdateCommand
11|02:23:39.389| ..defined 51 hotkeys for input locale 4105
08|02:23:46.775| ..downloading MSI from https://github.com/stevencohn/OneMore/releases/download/6.6.1/OneMore_6.6.1_Setupx64.msi
10|02:23:49.652| ..creating install script C:\Users\mhwilkie\AppData\Local\Temp\OneMoreInstaller.cmd
10|02:23:49.654| ..starting installation process

01|02:27:14.245| Starting dllhost 47560, 3000 Mhz, 64 MB, en-US/en-US, v6.6.1, OneNote 15.0, Office 16.0, 2024-11-05 14:27
01|02:27:14.247| ..Windows 10 Enterprise, Version 22H2, Build 19041, 64 bit
01|02:27:14.259| ..C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE (16.0.18129.20116)
01|02:27:14.277| ..OnConnection(ConnectionMode:ext_cm_Startup,custom[1:Int32])
01|02:27:14.277| ..OneAddInsUpdate(custom[])
01|02:27:14.936| ..building ribbon
01|02:27:14.942| ..building ribbon colorizer commands
01|02:27:15.212| ..building ribbon language proofing commands
01|02:27:15.217| ..building ribbon groups
01|02:27:15.220| ..building context menu
01|02:27:15.384| ..OnStartupComplete(custom[])
01|02:27:15.387| ..starting command service
01|02:27:15.387| ..starting reminder service
01|02:27:15.389| ..starting navigation service
01|02:27:15.924| ..starting hashtag service, Ready
01|02:27:15.925| ..ready
09|02:27:15.928| hashtag service waiting, Ready
10|02:27:15.931| Running command UpdateCommand
04|02:27:16.067| ..defined 51 hotkeys for input locale 4105
11|02:27:34.596| hashtag SERVICE scanned 320 pages, 31/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 15648ms
03|02:29:38.936| updated tags found on page /CBTS Notebook/Operations/Direct Dial Account Manager
05|02:29:51.478| updated tags found on page /Environmental Assessment/Projects/Class 1 Notification [ENV.383]
09|02:29:57.081| updated tags found on page /IT Server Notes/General/Order Ink & Paper for Map Printers
09|02:30:14.723| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 3 pages, saving 5 tags, in 40121ms
04|02:32:49.273| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 34544ms
10|02:35:27.456| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 38153ms
05|02:38:03.002| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 35526ms
03|02:40:38.380| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 35365ms
06|02:43:13.204| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 34805ms
11|02:45:48.583| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 35360ms
05|02:48:25.360| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 36769ms
07|02:51:03.005| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 37625ms
09|02:53:37.619| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 34606ms
03|02:56:16.755| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 39111ms
05|02:58:52.230| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 35466ms
05|03:01:27.203| hashtag service scanned 14 times in the last hour, averaging 34860ms
11|03:04:05.958| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 38721ms
04|03:06:40.807| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 34836ms
15|03:09:16.307| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 35489ms
08|03:11:51.512| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 35193ms
10|03:14:26.545| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 35019ms
20|03:16:53.127| OnBeginShutdown(custom[])
20|03:16:53.127| ..shutting down UI
20|03:16:53.132| ..OnDisconnection(RemoveMode:ext_dm_HostShutdown,custom:[])
20|03:16:53.132| ..disposing 8 streams
20|03:16:53.132| ..closing log

01|03:17:32.571| Starting dllhost 89756, 3000 Mhz, 64 MB, en-US/en-US, v6.6.1, OneNote 15.0, Office 16.0, 2024-11-05 15:17
01|03:17:32.573| ..Windows 10 Enterprise, Version 22H2, Build 19041, 64 bit
01|03:17:32.584| ..C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE (16.0.18129.20116)
01|03:17:32.600| ..OnConnection(ConnectionMode:ext_cm_Startup,custom[1:Int32])
01|03:17:32.600| ..OneAddInsUpdate(custom[])
01|03:17:33.288| ..building ribbon
01|03:17:33.293| ..building ribbon colorizer commands
01|03:17:33.645| ..building ribbon language proofing commands
01|03:17:33.649| ..building ribbon groups
01|03:17:33.651| ..building context menu
01|03:17:33.797| ..OnStartupComplete(custom[])
01|03:17:33.799| ..starting command service
01|03:17:33.799| ..starting reminder service
01|03:17:33.801| ..starting navigation service
01|03:17:34.344| ..starting hashtag service, Ready
01|03:17:34.344| ..ready
09|03:17:34.347| hashtag service waiting, Ready
10|03:17:34.351| Running command UpdateCommand
12|03:17:34.518| ..defined 51 hotkeys for input locale 4105
04|03:18:12.796| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 35428ms
03|03:20:34.206| Running command AboutCommand
10|03:20:48.392| hashtag SERVICE scanned 320 pages, 55/33 notebooks, 71 sections, updating 0 pages, saving 0 tags, in 35575ms
16|03:21:55.863| OnBeginShutdown(custom[])
16|03:21:55.863| ..shutting down UI
16|03:21:55.869| ..OnDisconnection(RemoveMode:ext_dm_HostShutdown,custom:[])
16|03:21:55.869| ..disposing 9 streams
16|03:21:55.869| ..closing log

01|03:26:10.560| Starting dllhost 36508, 3000 Mhz, 64 MB, en-US/en-US, v6.5.2, OneNote 15.0, Office 16.0, 2024-11-05 15:26
01|03:26:10.562| ..Windows 10 Enterprise, Version 22H2, Build 19041, 64 bit
01|03:26:10.574| ..C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE (16.0.18129.20116)
01|03:26:10.591| ..OnConnection(ConnectionMode:ext_cm_Startup,custom[1:Int32])
01|03:26:10.592| ..OneAddInsUpdate(custom[])
01|03:26:11.300| ..building ribbon
01|03:26:11.304| ..building ribbon colorizer commands
01|03:26:11.582| ..building ribbon language proofing commands
01|03:26:11.587| ..building ribbon groups
01|03:26:11.590| ..building context menu
01|03:26:11.754| ..OnStartupComplete(custom[])
01|03:26:11.757| ..starting command service
01|03:26:11.760| ..starting reminder service
01|03:26:11.762| ..starting navigation service
01|03:26:12.357| ..starting hashtag service, Ready
01|03:26:12.357| ..ready
09|03:26:12.360| hashtag service waiting, Ready
10|03:26:12.364| Running command UpdateCommand
11|03:26:12.462| ..defined 51 hotkeys for input locale 4105
04|03:26:29.695| Running command AboutCommand
04|03:26:50.757| hashtag service scanned 320 pages, updating 0, in 35377ms
07|03:29:25.642| hashtag service scanned 320 pages, updating 0, in 34860ms
11|03:32:00.892| hashtag service scanned 320 pages, updating 0, in 35238ms
11|03:34:36.919| hashtag service scanned 320 pages, updating 0, in 36012ms
09|03:37:12.067| hashtag service scanned 320 pages, updating 0, in 35123ms
07|03:39:46.617| hashtag service scanned 320 pages, updating 0, in 34543ms
16|03:42:22.020| hashtag service scanned 320 pages, updating 0, in 35390ms
04|03:44:57.711| hashtag service scanned 320 pages, updating 0, in 35675ms
04|03:47:32.238| hashtag service scanned 320 pages, updating 0, in 34521ms
15|03:50:09.821| hashtag service scanned 320 pages, updating 0, in 37576ms
11|03:52:44.448| hashtag service scanned 320 pages, updating 0, in 34617ms
03|03:55:19.094| hashtag service scanned 320 pages, updating 0, in 34638ms
10|03:57:54.060| hashtag service scanned 320 pages, updating 0, in 34963ms
10|04:00:28.988| hashtag service scanned 14 times in the last hour, averaging 35246ms
10|04:00:28.988| hashtag service scanned 320 pages, updating 0, in 34916ms
10|04:03:04.773| hashtag service scanned 320 pages, updating 0, in 35784ms
20|04:05:42.636| hashtag service scanned 320 pages, updating 0, in 37844ms
11|04:08:18.780| hashtag service scanned 320 pages, updating 0, in 36127ms
16|04:10:53.917| hashtag service scanned 320 pages, updating 0, in 35123ms
03|04:13:31.695| hashtag service scanned 320 pages, updating 0, in 37765ms
19|04:16:08.986| hashtag service scanned 320 pages, updating 0, in 37281ms
18|04:18:43.475| hashtag service scanned 320 pages, updating 0, in 34476ms
09|04:21:22.182| hashtag service scanned 320 pages, updating 0, in 38701ms
@maphew maphew added bug Something isn't working unread I have seen it or had time to refine it yet labels Nov 5, 2024
@stevencohn stevencohn removed the unread I have seen it or had time to refine it yet label Nov 6, 2024
@stevencohn
Copy link
Owner

stevencohn commented Nov 6, 2024

Hi. To ensure I OneMore is logging ths correctly... you have 55 notebooks. OneMore has scanned 33 of them. The remaining 25 notebooks must have more than 100 pages each, otherwise OneMore would have included them automatically. You can schedule a scan of the remaining 25 notebooks off-hours so it won't interfere with OneNote's responsiveness.

EDIT: To decrease the scan time, you can update the Delay between pages field to 0 in the Hashtag Settings. The default is 40ms. Setting it to 0 should bring the scan time down from 34 seconds to something around 200ms

@maphew
Copy link
Contributor Author

maphew commented Nov 6, 2024

Thanks Steven. I upgraded to 6.6.1 again. In settings I see where to schedule hashtag scan but I don't see 'Delay between pages'.

image

@stevencohn
Copy link
Owner

Sorry, my bad. Turn on Experimental features on the General sheet first. Restart OneNote. And then you'll see the Delay field.

@jasonjac2
Copy link

does the experimental checkbox do anything else in this release (would it be possible to include in the release notes as a heading)? I'm always tempted to check things like that :-).

@stevencohn
Copy link
Owner

https://onemoreaddin.com/developers/Experimental%20Features.htm

@jasonjac2
Copy link

Doh - sorry. Thanks for the link.

@maphew
Copy link
Contributor Author

maphew commented Nov 7, 2024

After enabling experimental features the extra delay setting showed up in hashtags panel. The value was already set at 0 so I left it alone. It didn't seem to help, but I;ll try fior awhile and see what happens.

@cspotcode
Copy link

I believe I'm hitting the same. Related to #1506 / #1520 I guess?

I ended up disabling the hashtag service entirely, which is a bummer. But I tried the various workarounds to schedule the scans, and could never eliminate the lag issues. Nor could I settle on a hashtag workflow that felt productive, maybe it's just not right for me. No biggie.

But I wonder, how does OneNote's default search avoid such lag? Is it the nature of COM addins that they must freeze the UI in order to read the full contents of a notebook? Do the calls to read page contents always lock the UI for a time?

@stevencohn
Copy link
Owner

I'll continue investigating.

@cspotcode, Internally, OneNote search content is built as Windows Search indexes which are built from a separate service process that does not go through OneNote itself. The built-in OneNote search results just query the Windows Search Index. This is notoriously bad when used within OneNote as it often misses content, can't resolve substrings within words, and doesn't ignores punctuation and other special characters.

@cspotcode
Copy link

cspotcode commented Nov 9, 2024

Thanks, this information is helpful. I'm tinkering with writing my own search replacement. I used the C# interop API to extract every page, and I can see that it locks up the OneNote UI just the same as OneMore's hashtag scan.

I figure, VSCode can do regexp searching really fast across pretty big codebases, so at least for the size of my notebooks, snappy regexp search should be possible without necessarily needing to build a search index; just need to store the raw page contents somewhere outside of OneNote.

To keep the UI responsive, I'll postpone all page extractions until you do a search, won't do any background indexing. Once you do a search, I'll extract only pages that have changed since the last scan.

I dunno, will see how far I get.

@stevencohn
Copy link
Owner

The biggest reasons I've seen for lag is very large pages, or pages that contain a lot of handwriting or drawing. OneNote converts native .one data files to XML and that can be time consuming. If you've opted to stylize hashtags with a highlight color, then writing large files, converting them from XML to native is 10x times longer. Is this the case at all in your notebooks?

@cspotcode
Copy link

I'm not sure if the question was directed at me or maphew. If me:

Hmm, some of my really old notebooks do have lots of handwriting. These days, the big items are images and attachments. None have tons of custom font/color styles.

My export tool takes only 15-20s to export every single page, so it's pretty fast. It's just that, while it's exporting, the OneNote UI is laggy. So I don't want to run it automatically while I'm trying to get work done.

To get a list of every single page, I'm using a single call to oneNoteApp.GetHierarchy(null, hsPages, out var xml). Hopefully that's not a stupid idea.

@stevencohn
Copy link
Owner

It's difficult not being able to repro the problem so asking questions where I can.

Loading the entire hierarchy is not a bad idea. I've found that on modern machines, which usually have at least 16MB, it works just as well as loading and looping through each notebook.

@maphew
Copy link
Contributor Author

maphew commented Nov 12, 2024

I have maybe a dozen pages that have handwriting, plus about the same that are some kind of "drawing with pen". Each one is initial view plus 1 page down (ish). Like @cspotcode I've disabled hashtag indexing service until I can again devote time to troubleshooting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants