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

Slow Interactions Recently #262

Closed
brodieG opened this issue Feb 21, 2020 · 1 comment
Closed

Slow Interactions Recently #262

brodieG opened this issue Feb 21, 2020 · 1 comment
Labels
bug
Milestone

Comments

@brodieG
Copy link
Owner

@brodieG brodieG commented Feb 21, 2020

Last time I looked into a failing unitizer it ran very slowly. It might have been due to a large set of loaded namespaces. Need to examine this.

@brodieG brodieG added the bug label Feb 21, 2020
@brodieG brodieG modified the milestones: 1.4.7, 1.4.10, 1.4.9 Feb 21, 2020
@brodieG
Copy link
Owner Author

@brodieG brodieG commented Feb 25, 2020

Oddly the slowness is after an expression is computed at the prompt, manifesting between result display and new prompt display. But help display is fast. History?

Oh boy, someone added a gc to showConnections:

> f <- tempfile()
> zz <- unitizer:::history_capt(f)
> unitizer:::history_write('hello')
Error in unitizer:::history_write("hello") : 
  is.open_con(hist.con) is not TRUE
> unitizer:::history_write(zz$con, 'hello')
> hello
Error: object 'hello' not found
> unitizer:::history_write(zz$con, 'hello')
> treeprof::treeprof( unitizer:::history_write(zz$con, 'hello'))
Profiling
auto gc: running with gc() first
First run in 0.538 seconds
Looping to 5 seconds
Parsing Rprof
Done
Ticks: 1589; Iterations: 10; Time Per: 401.0 milliseconds; Time Total: 4.010 seconds; Time Ticks: 1.589

                                              milliseconds
unitizer:::history_write ----------------- : 401.0 -   0.0
    stopifnot ---------------------------- : 143.3 -   0.0
    |   ...elt --------------------------- : 143.3 -   0.0
    |       is.open_con ------------------ : 143.3 -   0.0
    |           isTRUE ------------------- : 143.3 -   0.0
    |               is.valid_con --------- : 143.3 -   0.0
    |                   showConnections -- : 143.3 -   0.0
    |                       gc ----------- : 143.3 - 143.3
    try ---------------------------------- : 138.3 -   0.0
    |   loadhistory ---------------------- : 138.3 -   0.0
    |       showConnections -------------- : 138.3 -   0.0
    |           gc ----------------------- : 138.3 - 138.3
    is.open_con -------------------------- : 119.1 -   0.0
        isTRUE --------------------------- : 119.1 -   0.0
            is.valid_con ----------------- : 119.1 -   0.0
                showConnections ---------- : 119.1 -   0.0
                    gc ------------------- : 119.1 - 119.1
brodieG added a commit that referenced this issue Feb 25, 2020
@brodieG brodieG closed this in 28c5fdb Mar 2, 2020
brodieG added a commit that referenced this issue Mar 2, 2020
Fix #262, Fix #261, Fix #244, stringsAsFactors
see NEWS.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.