Skip to content

Make 'print' throttle its output #232

Closed

Description

@FlutterIssues

Issue by Hixie
Monday Oct 26, 2015 at 21:30 GMT
Originally opened as https://github.com/flutter/engine/issues/1804


We should move the debugPrint() logic in rendering/debug.dart to the C++ side. It does seem to have solved the problem of data loss during high-volume logging.

(Having it on the C++ side, as native behaviour of Dart's print() built-in, would mean that all debug output would be throttled the same way, so people writing new frameworks would get this automatically, and people wouldn't have to import rendering.dart to get it even in regular Flutter apps.)

Activity

  1. added this to the milestone on Nov 9, 2015
  2. added
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    and removed
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    on Dec 12, 2015
  3. sethladd commented on Sep 14, 2016

    @sethladd
    Contributor

    Do we still plan to do this?

  4. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 14, 2016
  5. Hixie commented on Sep 14, 2016

    @Hixie
    Contributor

    Yes. Having debugPrint and print do different things leads to a confusing debug experience.

  6. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 20, 2016
  7. eseidelGoogle commented on Jun 6, 2017

    @eseidelGoogle
    Contributor

    FYI @cbracken who's been in print stuff recently. (Not important, just thought you might like to see.)

  8. 7 remaining items

  9. removed this from the milestone on Jun 1, 2020
  10. removed this from the milestone on Jun 16, 2020
  11. removed this from the milestone on Jul 7, 2020
  12. modified the milestone: on Jul 22, 2020
  13. removed this from the milestone on Aug 17, 2020
  14. pedromassangocode commented on Aug 26, 2020

    @pedromassangocode

    Does this still a valid issue?

  15. cbracken commented on Aug 27, 2020

    @cbracken
    Member

    debugPrint and debugPrintThrottled (its default implementation) have moved from rendering to lib/src/foundation/print.dart and is still a Dart implementation that buffers lines in a list of strings, then schedules periodic flushes.

    The intent here is to shift that logic from the framework to dart:ui in the engine so that people writing alternative frameworks could make use of it without having to pull in bits of the Flutter framework. In that sense, the issue is still valid, but given that a vast majority of our users are using Flutter with the framework (and not just dart:ui), this is likely to remain low on our priority list for the time being. Given that we've pulled it out of the render layer and into the foundation layer of the framework, it's probably even lower priority than it once was.

    If someone in the community would like to implement this, I'll gladly review it though!

  16. pedromassangocode commented on Aug 28, 2020

    @pedromassangocode

    I would like to take this. So what needs to be done is to move the print.dart file to the sky_engine/ui directory?

  17. Hixie commented on Feb 4, 2021

    @Hixie
    Contributor

    debugPrint has evolved into a more elaborate API than would make sense to squeeze into print, so I think this is now WONTFIX.

  18. github-actions commented on Aug 6, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  19. locked as resolved and limited conversation to collaborators on Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: contributor-productivityTeam-specific productivity, code health, technical debt.engineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.r: invalidIssue is closed as not valid

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions