top | item 40485500

(no title)

davidalayachew | 1 year ago

> Instead of relying on Javadoc, the built-in doc generator, I created the engine from scratch to give the documentations a modern look, build fast search indexes, and enable link resolution to other packages.

Javadoc already gives you an extremely fast search index and search bar. Granted, it's only in the newest versions of Java.

discuss

order

martin_dd|1 year ago

Author here. Yes, the search bar is nice already, and the performance is good enough for most use cases. Fun fact, javadoc's search is O(n), Docland uses binary search so it's O(log2n). That's why the search bar in the official java.base documentation is noticeably laggy.

The real benefit of customizing search is custom ranking and filtering logic. Docland sorts the search results by relevance (matching prefix length and casing) and dedupes overloads. In my (possibly biased) opinion it's easier to use.

davidalayachew|1 year ago

> Author here. Yes, the search bar is nice already, and the performance is good enough for most use cases.

Agreed. If you do have performance improvements in mind, I would recommend you bring them up to the Javadoc jdk team. They would definitely take a look if you can point out a faster solution.

https://openjdk.org/projects/javadoc-next/

> That's why the search bar in the official java.base documentation is noticeably laggy.

On my $400 laptop from 2020, I have a response time of <= 0.25 seconds. Are you seeing something different?