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

Reconsider print method details #714

Closed
juliasilge opened this issue Feb 15, 2023 · 2 comments · Fixed by #718
Closed

Reconsider print method details #714

juliasilge opened this issue Feb 15, 2023 · 2 comments · Fixed by #718

Comments

@juliasilge
Copy link
Member

The print method for a board involves calling pin_list():

pins <- pin_list(x)

The results look like:

library(pins)
board_connect()
#> Connecting to Posit Connect 2023.01.0 at <https://colorado.posit.co/rsc>
#> Pin board <pins_board_connect>
#> Cache size: 114K
#> Pins [130]: 'katie.masiello/user-info', 'katie.masiello/content_list',
#>   'julia.silge/cat-tracking-uk', 'katie.masiello/aqi_readings',
#>   'katie.masiello/aqi_exceeding_stations',
#>   'sam.edwardes/bike-predict-r-station-info-pin',
#>   'katie.masiello/codenames', 'katie.masiello/logs',
#>   'kelly.obriant/python-pin-test', 'julia.silge/housing-metrics',
#>   'sam.edwardes/bike-predict-model-metrics',
#>   'sam.edwardes/bike_predict_model_r',
#>   'julia.silge/traffic-crash-model-metrics',
#>   'julia.silge/superbowl-rf-test-2', 'julia.silge/cars-keras',
#>   'michael.chow/mtcars3', 'julia.silge/home-prices',
#>   'julia.silge/new_metrics', 'julia.silge/single-tag-numbers', '...'

Created on 2023-02-15 with reprex v2.0.2

I notice that this can feel S L O W on our demo server. Is it helpful to show these pins? Do folks really expect this? I don't know that there is a useful way to make this faster other than just removing the list.

@kmasiello
Copy link

I concur -- but it doesn't feel slow, it IS slow! I'm an admin on that server, so I have visibility of significantly more records. It takes over 30 seconds to render:

library(pins)
start <- Sys.time()
board_connect()
#> Connecting to Posit Connect 2023.01.0 at <https://colorado.posit.co/rsc>
#> Pin board <pins_board_connect>
#> Cache size: 619K
#> Pins [843]: 'katie.masiello/aqi_readings',
#>   'katie.masiello/aqi_exceeding_stations',
#>   'pritam.dalal/bitcoin_intraday', 'thomas/boston-weather',
#>   'sam.edwardes/bike-predict-r-station-info-pin',
#>   'katie.masiello/codenames', 'katie.masiello/logs',
#>   'katie.masiello/nonshiny_raw_usage',
#>   'katie.masiello/shiny_raw_usage', 'pritam.dalal/soybean_yields_pin',
#>   'katie.masiello/group_members_tbl', 'katie.masiello/group_names_tbl',
#>   'lisa.anders/cars_dataset', 'roger.andre/new_faithful_data',
#>   'katie.masiello/katietestpin', 'katie.masiello/user-info',
#>   'katie.masiello/content_list', 'julia.silge/cat-tracking-uk',
#>   'kelly.obriant/python-pin-test', '...'
message(paste("Duration =", Sys.time()-start, "seconds"))
#> Duration = 32.7105123996735 seconds

Created on 2023-02-16 by the reprex package (v2.0.1)

Having used pins extensively, I have never had a use case for calling board_connect() without assigning it to a variable (and thus avoiding this pain). It has only been by accident that I have directly invoked this function and learned quickly that it should be avoided. There's no value to the pin_list() output in this scenario.

Sentiment also seconded by a Posit Connect customer during a call today.

@github-actions
Copy link

github-actions bot commented Mar 9, 2023

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants