-
Notifications
You must be signed in to change notification settings - Fork 97
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
Misc more optimisations #883
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is supposed to be in the "Get rid of unresolved paths in docs" commit ?
Otherwise, I think it's ready to merge :)
@@ -93,7 +93,7 @@ and extension env parent t = | |||
} | |||
in | |||
let type_path = type_path env t.type_path in | |||
let constructors = List.map constructor t.constructors in | |||
let constructors = List.rev_map constructor t.constructors |> List.rev in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt these are useful to reduce stack trace sizes. (constructors, field, type/class argument). However, it might be a good idea for signature items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They all make it harder to read, even if they aren't particularly long lists, so I did a whole load of them.
That docs commit isn't particularly obvious! It's actually because odoc sometimes gets a bit confused when looking at cmt files where the 'wrong' type has been inferred - in particular if the compiler has decided a type is from a hidden module directly (ie, not going via a module with a |
I see, thanks. |
src/xref2/tools.ml
Outdated
fun ~mark_substituted env sg subs -> | ||
let open ResultMonad in | ||
List.fold_left | ||
(fun sg_opt sub -> | ||
sg_opt >>= fun sg -> fragmap ~mark_substituted env sub sg) | ||
(Ok sg) subs | ||
|
||
and assert_not_functor : | ||
type err. expansion -> (Component.Signature.t, err) Result.t = function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type err. expansion -> (Component.Signature.t, err) Result.t = function | |
type err. expansion -> (Component.Signature.t, err) Result.result = function |
Compat with 4.02. Also, formatting is needed.
This helps in particular when analysing with e.g. magic-trace
This was originally to 'dedup' paths, but since they're no longer as large as they were before we don't need to do this. Applies to both compile.ml and link.ml
Since the change to stop round-tripping signatures through components this is now useless
It wasn't being used and it slowed things down.
29d6329
to
a043692
Compare
CHANGES: Additions - New unstable option `--as-json` for the HTML renderer that emits HTML fragments (preamble, content) together with metadata (table of contents, breadcrumbs, whether katex is used) in JSON format. (@sabine, ocaml/odoc#908) - New maths support via `{m ... }` and `{math ... }` tags. (@giltho, @gpetiot, ocaml/odoc#886) - Various optimisations (@jonludlam, ocaml/odoc#870, ocaml/odoc#883) - Better handling of alerts and deprecation notices. (@panglesd, ocaml/odoc#828) - Handle language tags on code blocks (@Julow, ocaml/odoc#848) Bugfixes - Shadowing issues (@jonludlam, ocaml/odoc#853) - Layout fixes and improvements (@panglesd, ocaml/odoc#832, ocaml/odoc#839, ocaml/odoc#847) - Handle comments on class constraints and inherit (@Julow, ocaml/odoc#844) - Disable the missing root warning (@jonludlam, ocaml/odoc#881)
A few more optimisations and fixes. Again, based on the previous PRs.