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

Bespoke Layout Performance #9

Open
WilliamsTravis opened this issue May 27, 2022 · 2 comments
Open

Bespoke Layout Performance #9

WilliamsTravis opened this issue May 27, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@WilliamsTravis
Copy link
Collaborator

Bug Description
This function is not quick enough as caching does not appear to working properly. Check the caching or only pull one point at a time from the data set.

@WilliamsTravis WilliamsTravis added the bug Something isn't working label May 27, 2022
@alexandermorgan
Copy link

You could rely on the reset_index method's default of returning a copy to avoid making your own copy and save a fair amount of work here:

Current:

    sc_developable_df = sc_df[sc_df['capacity'] > 0].copy()
    # reset the index because otherwise the unpacker will get messed up
    sc_developable_df.reset_index(drop=True, inplace=True)

Alternative:
sc_developable_df = sc_df[sc_df['capacity'] > 0].reset_index(drop=True)

There are a few other similarly simple speed ups available in this repo by avoiding making unnecessary iterables, using translate tables instead of multiple calls to str.replace, etc. I'm happy to make a pr if you're looking for this sort of thing. This is a really cool project!

@WilliamsTravis
Copy link
Collaborator Author

Hello, yes, that all sounds excellent, glad to see someone outside our little group using reView. I've been quite busy with other projects for a while and I would definitely appreciate a pull request for this piece!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants