publiclab / plots2

a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! :balloon:
https://publiclab.org
GNU General Public License v3.0
956 stars 1.83k forks source link

Outreachy '20: Optimize Performance and accessibility Project Planning #7883

Open Tlazypanda opened 4 years ago

Tlazypanda commented 4 years ago

Hey everyone! This is a planning issue to map out all the tasks to be covered in the upcoming weeks and create a room for further discussions and improvements.

Note: see original proposal here: https://publiclab.org/notes/itm2017004/03-12-2020/outreachy-proposal-optimize-performance-and-accessibility-of-public-lab-content

Performance Analysis and Improvement:

Tasks:

New work added (not defined in the scope before)

Accessibility

See https://firefox-source-docs.mozilla.org/devtools-user/accessibility_inspector/index.html for firefox accessibility inspector, and WAVE assessment

Tasks

Worked on a route-to-route basis by testing against WAVE assessment (#8054 #8028 #7995 #7989 #7977 #7975 #7968 #7966 #7962 ) FTOs opened (#8094 #8093 #8092 #8055 #8032 #8030 #8029 #8007 #8006 #8005 #8001 #8000 )

Printability

Tasks:

Modified scope to avoid working with additional libraries:-

Documentation

Tasks:

8057 https://hackmd.io/@itm2017004/BJuqtap6L

Up for discussion

Tasks:

Tlazypanda commented 4 years ago

@jywarren @cesswairimu @SidharthBansal This is just an initial draft for the planning. Since all of the features to be implemented require rigorous testing I think it would be better for now to not make this a project :sweat_smile: . Please go through all of the tasks I have raised, I have tried to be as elaborate as possible and since these are a not bugs, its entirely upon us if we want to implement it this way or not.

Also since most of these are tasks that would be better tested in the production environment, I will seek your constant support upon merging these to help me test it out :100:

I was also wondering if it is possible for me to start working on them right away since I want to make the most out of it :smile: without breaking anything xD

There are also a couple of issues/questions that I have to discuss after going through the codebase :thought_balloon: Thanks a lot!! :rocket:

cesswairimu commented 4 years ago

Great breakdown...Thanks for opening this @Tlazypanda

emilyashley commented 4 years ago

Yes! Happy to see this.

Also just want to say I'm here to help with any of the steps. I <3 WebPerf!

Tlazypanda commented 4 years ago

@emilyashley Thanks! Will be sure to keep you in the loop :tada:

SidharthBansal commented 4 years ago

Awesome, there are so many things to cover up this Outreachy! Which one are you targeting first?

jywarren commented 4 years ago

This is looking great. Hoping to go through it for some suggestions today! I added a link to your proposal too!

Tlazypanda commented 4 years ago

@SidharthBansal I plan to start with Improving Performance first and have opened some issues for the same :sweat_smile: Thanks a lot for reviewing :100:

@jywarren Yeah thanks :v: I have opened some issues for the start as well where I have added more details for each issue :sweat_smile: And as always looking forward to your suggestions :rocket:

jywarren commented 4 years ago

Awesome to see all this. It seems super well planned out. Perhaps we could pull in some of the PDF generation (in-browser vs. in-app) discussion from your proposal too?

There is some really amazing stuff here! Wow, esp. in the "Up for Discussion" section!

Another thought is that this planning issue (and perhaps a summary later on) could be used as a template to inform similar refinements to our other Rails projects!

Great work!!!

jywarren commented 4 years ago

Oh, also -- you can also create a milestone for all this as the issues start to be broken out!

Tlazypanda commented 4 years ago

@jywarren Thanks :v: :smile:
Just have one more exam to go and then I will create the milestone :+1: .

Sure will try to add points about the pdf discussion here as well :sweat_smile: . And yeah Really looking forward to making this a template for other rails projects too :rocket:

jywarren commented 4 years ago

Hi @Tlazypanda! Would you mind updating this issue briefly with your recent work/progress, just so it stays current? Thank you!!! Hope your exams went well :-)

For example https://github.com/publiclab/plots2/pull/7966 and https://github.com/publiclab/plots2/issues/7963 are AWESOME 🎉

jywarren commented 4 years ago

Another way you can keep up to date is to also assign all your issues and PRs to a milestone. Then we can track there and you can do a little less manual updating of this issue! Thanks!

jywarren commented 4 years ago

I see you have https://github.com/publiclab/plots2/milestone/27 so i linked this to it! 🎉

Tlazypanda commented 4 years ago

@jywarren Thanks for the tip :tada: Will update it in a day or two :sweat_smile:

emilyashley commented 4 years ago

Thanks for all the awesome work on this so far!

jywarren commented 4 years ago

Hi @Tlazypanda i just noticed a route with pretty slow response time and you don't have to prioritize it at all but it was a little unusual and I recall seeing long wait times for it in the past -- posting a comment! It's not even a full page load, it's AJAX, so it should be faster. I wonder -- maybe it's to do with sending the emails? But that should be handled by ActiveJob asynchronously. Here, i'll look in Skylight to see what's up... https://oss.skylight.io/app/applications/GZDPChmcfm1Q/1591890000/6h/endpoints/CommentController%23create?responseType=js (nothing really jumps out but lots of "allocation time"??? however, indeed 4.2 seconds at the /fast/ end doesn't sound good...)

Anyways, this could be broken out into its own issue for analysis but i thought you might want to hear of a particular action on the site that needs your help! No rush at all, i love the work you're doing, and hope this is helpful!

Tlazypanda commented 4 years ago

Hey @jywarren I am planning to modify all the ORM queries that might be slow/repetitive as flagged by skylight so I will take this into consideration :smile: Thanks for letting me know :v: I am still learning about the ORM querying system in rails so might take some time to get back on this :sweat_smile:

cesswairimu commented 4 years ago

Hi @Tlazypanda. maybe you could update the task list and check the tasks that you have completed

Tlazypanda commented 4 years ago

Ohh yes! I have been meaning to do that for a long time now :joy: Finally gotta get this done xD

Tlazypanda commented 4 years ago

@jywarren @cesswairimu @ebarry Have got some edits into the tasklist :joy: still need to refine this more

Also wanted to share the results for the work done so far:- Before:-

image

After:- (on different routes depending on the assets they have/load)

image

image

ebarry commented 4 years ago

Wow look at this performance boost!!!!! 🤩🤩🤩🤩🤩🤩🤩🤩

sagarpreet-chadha commented 4 years ago

Wow this is awesome 🎉

cesswairimu commented 4 years ago

wow fantastic :rocket:

jywarren commented 4 years ago

Hi @Tlazypanda this is super, by the way, i forgot to comment! I wonder now that a lot more things have been merged and published, if we get an even better score!