You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
3.7 KiB

  1. Type and Pointer Analysis to-do list
  2. ====================================
  3. Alan Donovan <adonovan@google.com>
  4. Overall design
  5. --------------
  6. We should re-run the type and pointer analyses periodically,
  7. as we do with the indexer.
  8. Version skew: how to mitigate the bad effects of stale URLs in old pages?
  9. We could record the file's length/CRC32/mtime in the go/loader, and
  10. refuse to decorate it with links unless they match at serving time.
  11. Use the VFS mechanism when (a) enumerating packages and (b) loading
  12. them. (Requires planned changes to go/loader.)
  13. Future work: shard this using map/reduce for larger corpora.
  14. Testing: how does one test that a web page "looks right"?
  15. Bugs
  16. ----
  17. (*ssa.Program).Create requires transitively error-free packages. We
  18. can make this more robust by making the requirement transitively free
  19. of "hard" errors; soft errors are fine.
  20. Markup of compiler errors is slightly buggy because they overlap with
  21. other selections (e.g. Idents). Fix.
  22. User Interface
  23. --------------
  24. CALLGRAPH:
  25. - Add a search box: given a search node, expand path from each entry
  26. point to it.
  27. - Cause hovering over a given node to highlight that node, and all
  28. nodes that are logically identical to it.
  29. - Initially expand the callgraph trees (but not their toggle divs).
  30. CALLEES:
  31. - The '(' links are not very discoverable. Highlight them?
  32. Type info:
  33. - In the source viewer's lower pane, use a toggle div around the
  34. IMPLEMENTS and METHODSETS lists, like we do in the pacakge view.
  35. Only expand them initially if short.
  36. - Include IMPLEMENTS and METHOD SETS information in search index.
  37. - URLs in IMPLEMENTS/METHOD SETS always link to source, even from the
  38. package docs view. This makes sense for links to non-exported
  39. types, but links to exported types and funcs should probably go to
  40. other package docs.
  41. - Suppress toggle divs for empty method sets.
  42. Misc:
  43. - The [X] button in the lower pane is subject to scrolling.
  44. - Should the lower pane be floating? An iframe?
  45. When we change document.location by clicking on a link, it will go away.
  46. How do we prevent that (a la Gmail's chat windows)?
  47. - Progress/status: for each file, display its analysis status, one of:
  48. - not in analysis scope
  49. - type analysis running...
  50. - type analysis complete
  51. (+ optionally: there were type errors in this file)
  52. And if PTA requested:
  53. - type analysis complete; PTA not attempted due to type errors
  54. - PTA running...
  55. - PTA complete
  56. - Scroll the selection into view, e.g. the vertical center, or better
  57. still, under the pointer (assuming we have a mouse).
  58. More features
  59. -------------
  60. Display the REFERRERS relation? (Useful but potentially large.)
  61. Display the INSTANTIATIONS relation? i.e. given a type T, show the set of
  62. syntactic constructs that can instantiate it:
  63. var x T
  64. x := T{...}
  65. x = new(T)
  66. x = make([]T, n)
  67. etc
  68. + all INSTANTIATIONS of all S defined as struct{t T} or [n]T
  69. (Potentially a lot of information.)
  70. (Add this to guru too.)
  71. Optimisations
  72. -------------
  73. Each call to addLink takes a (per-file) lock. The locking is
  74. fine-grained so server latency isn't terrible, but overall it makes
  75. the link computation quite slow. Batch update might be better.
  76. Memory usage is now about 1.5GB for GOROOT + go.tools. It used to be 700MB.
  77. Optimize for time and space. The main slowdown is the network I/O
  78. time caused by an increase in page size of about 3x: about 2x from
  79. HTML, and 0.7--2.1x from JSON (unindented vs indented). The JSON
  80. contains a lot of filenames (e.g. 820 copies of 16 distinct
  81. filenames). 20% of the HTML is L%d spans (now disabled). The HTML
  82. also contains lots of tooltips for long struct/interface types.
  83. De-dup or just abbreviate? The actual formatting is very fast.