Skip to content

Fix word list speed in reader setup dialog#6

Merged
JohnThomson merged 1 commit into
BloomBooks:masterfrom
phillip-hopper:BL-523-b
Oct 8, 2014
Merged

Fix word list speed in reader setup dialog#6
JohnThomson merged 1 commit into
BloomBooks:masterfrom
phillip-hopper:BL-523-b

Conversation

@phillip-hopper

Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're trying to optimize here, would it save significant time to remember the current longest length? I don't know whether Java's implementation has to count the letters on each call to length...might not be significant, especially since most words are fairly short.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

JohnThomson added a commit that referenced this pull request Oct 8, 2014
Fix word list speed in reader setup dialog
@JohnThomson
JohnThomson merged commit 57db4cd into BloomBooks:master Oct 8, 2014
@phillip-hopper
phillip-hopper deleted the BL-523-b branch December 1, 2014 14:25
hatton added a commit that referenced this pull request Jun 26, 2026
#7949)

Code changes responding to the PR review:

- Team Collections (review #1/#3/#4/#13): BloomBridge's mutating external
  endpoints (add/update/process-book) now fail fast on a Team Collection rather
  than silently corrupting a shared collection (they don't honor checkout, the
  TeamCollection.status file, or TC renames). Adds
  CollectionModel.IsEditableCollectionATeamCollection and
  ExternalApi.RefuseIfTeamCollection, and documents the non-TC assumption on
  CollectionModel.AddBookFromFolder.

- Off-screen JS bridge cleanup (#6/#7/#8) in BookProcessor: the capture trigger
  is now fire-and-forget (its result was discarded), the redundant
  Application.DoEvents() in the poll loop is removed (the sync call already pumps
  the loop), and WaitForJavascriptResult documents why the off-screen processor
  keeps the poll-a-window-global approach rather than the live editor's async
  API callback.

- Async page-readiness (#10/#11/#15): SetImageDisplaySizeIfCalledFor now
  registers a requestPageContent delay around its asynchronous image-info fetch
  and resize, so captureContentForExternalProcessing waits for image sizing to
  finish before capturing. Corrects the editablePage.ts comments that wrongly
  called the load-time fix-ups "synchronous", and clarifies the natural-size
  fallback in autoFitImageOverTextSplits.

- autoFit overlays (#14): fitOneImageOverTextSplit now also skips pages whose top
  pane has non-text overlays (canvas elements other than the background image),
  not just text overlays.

- Smaller comment fixes: clarify the "already in the collection" guard in
  AddBookFromFolder (#2); document that the process-book overlay message is
  intentionally not localized (#12); note that priorForeground is captured once
  on purpose (#5); move the JSON-vs-delimiter note next to the code it describes
  (#16); raise the ExternalBusyOverlay z-index (#17).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
hatton added a commit that referenced this pull request Jul 10, 2026
Plan item 4. KeyboardResolver runs the per-machine cascade (pinned
system -> pinned kmw -> Automatic: best OS match, else cached KMW
fallback, else default) with a per-session ConcurrentDictionary cache
(safe because keyboard changes require restart) and a background fetch
of the top Keyman suggestion when Automatic finds no OS keyboard
online - writing only CachedKmwFallbackKeyboard, marshalled to the UI
thread and skipped while the settings dialog is open (plan risk #6).

KeyboardingConfigApi drops all spike code and adds the real
POST keyboarding/fieldFocused (handleOnUiThread): resolve, switch the
OS keyboard only when the target differs from the last activation
(never per keystroke), and reply the fixed contract the browser
integration consumes. useKmw is true only when the keyboard is fully
cached locally; otherwise it replies useKmw:false, activates default,
and kicks a deduped background download so the next focus succeeds.
CollectionKeyboardCache gains IsCached/GetFontUrl for the endpoint.

Implemented by Claude Sonnet teammates under Claude Fable orchestration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants