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

Cache ModelElements for dynamic and Never #3815

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

srawlins
Copy link
Member

@srawlins srawlins commented Jul 7, 2024

I haven't done a memory benchmark, but for certain packages, I think we are currently creating many instances of dartdoc's Dynamic and NeverType classes, whenever dynamic and Never are used in a public API type, even a type argument, etc. Dartdoc's ModelElement classes all participate in an existing cache, so it is pretty simple to start using the cache for these two types.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@srawlins
Copy link
Member Author

srawlins commented Jul 8, 2024

CC @dart-lang/analyzer-team

@srawlins srawlins merged commit 9e86c9b into dart-lang:main Jul 8, 2024
9 checks passed
@srawlins srawlins deleted the cache-dynamic branch July 8, 2024 21:02
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jul 15, 2024
…p, stack_trace, test, tools

Revisions updated by `dart tools/rev_sdk_deps.dart`.

browser_launcher (https://github.com/dart-lang/browser_launcher/compare/6012690..fe7ffa1):
  fe7ffa1  2024-07-08  Kevin Moore  update lints (dart-lang/browser_launcher#62)

cli_util (https://github.com/dart-lang/cli_util/compare/6419270..6a0bb92):
  6a0bb92  2024-07-08  Kevin Moore  update lints (dart-lang/cli_util#106)

clock (https://github.com/dart-lang/clock/compare/ad428ea..6e43768):
  6e43768  2024-07-08  Kevin Moore  update lints (dart-lang/clock#68)
  b303a4b  2024-07-08  Kevin Moore  blast_repo fixes (dart-lang/clock#67)

dartdoc (https://github.com/dart-lang/dartdoc/compare/5e8de16..f6f93dd):
  f6f93ddf  2024-07-09  Sam Rawlins  Remove cross-export warning. (dart-lang/dartdoc#3523)
  9e86c9bf  2024-07-08  Sam Rawlins  Cache ModelElements for dynamic and Never (dart-lang/dartdoc#3815)
  eb04bf82  2024-07-08  Sam Rawlins  Bump to 8.0.11 (dart-lang/dartdoc#3817)
  6e3f1ace  2024-07-08  Sam Rawlins  Use the existing AnalysisContext in PackageBuilder (dart-lang/dartdoc#3814)

ecosystem (https://github.com/dart-lang/ecosystem/compare/4171189..2635536):
  2635536  2024-07-10  Devon Carew  create a change policy for package:dart_flutter_team_lints (dart-lang/ecosystem#278)

http (https://github.com/dart-lang/http/compare/4178b67..edbb5a9):
  edbb5a9  2024-07-12  Brian Quinlan  Add WebSocket usage examples to cupertino_http (dart-lang/http#1266)
  760564f  2024-07-11  Brian Quinlan  Prepare to publish cupertino_http 1.5.1 (dart-lang/http#1264)
  fd2c60e  2024-07-11  Brian Quinlan  Remove `runWithClient` Flutter example (dart-lang/http#1263)
  fece5b3  2024-07-11  Brian Quinlan  Document that widgets must be initialized before using the cronet_http (dart-lang/http#1262)
  3be8288  2024-07-11  Brian Quinlan  Prepare to publish cronet_http 1.3.2 (dart-lang/http#1265)
  068308b  2024-07-11  Hossein Yousefi  Upgrade jni and jnigen to 0.10.1 and 0.10.0 (dart-lang/http#1261)

stack_trace (https://github.com/dart-lang/stack_trace/compare/4fd3e2a..090d3d1):
  090d3d1  2024-07-08  Kevin Moore  update lints (dart-lang/stack_trace#157)

test (https://github.com/dart-lang/test/compare/14f9b3e..2c2ac49):
  2c2ac49d  2024-07-09  Nate Bosch  Expand error message for async test declaration (dart-lang/test#2251)

tools (https://github.com/dart-lang/tools/compare/43a8582..6a07a16):
  6a07a16  2024-07-08  Kevin Moore  update lints (dart-lang/tools#284)

Change-Id: I19ae934af5d9e5abf98537c4cb8fcd6288d0bc13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375740
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.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