-
Notifications
You must be signed in to change notification settings - Fork 20
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
Reduce the size of the gem #127
Comments
It should download the js, css files to |
Hi @Shekharrajak, |
@snpd25 , first step will be , to find out the files and folders which can be removed from the gem source . You can see there are many js ,css files present in the vendor/assets folder , so that highcharts can work offline as well. (I think we can remove the googlecharts js files , since any way it requrie internet - You can find out more about it in blog or wiki page). Now we have only highcharts js , css files. We want daru-view highcharts library working without internet as well, so we need it (after or while the installation). Since we can update the js and css file : #83 . Similarly we need to download it if internet is available (or it should be present already while the installation - may be compressed). |
So , I need to remove the googlecharts js , css files and leave the highcharts js, css files as it is? |
See how daru-view googlechart adapter is using those js files and what will be the impact when you remove it (understand how it will work without those files - by running IRuby notebook examples present in spec/dummy_iruby). You can create a PR so that I can understand your approach (I just want to see other approaches, so I have just given a hint). |
I guess many unnecessary files are already removed, presently there are 3 files : jspdf.min.js , loader.js and google_visualr.js . The command |
You must try it and check if any testcase is failing. I hope you have gone through development workflow. |
Yes I have checked that, the testsuits are running the same after regenerating those js files, without throwing any error with respect to googlecharts. |
Yes, that is for developers. In the user perspective, the gem will not be having those files. Without running any command how it will plot graphs? |
I think I haven't understood about the files you are referring to. As I have checked, from the user perspective as well, those three js files of googlecharts are present. |
Please let me know what are steps you followed. |
I ran the test-suite using |
Can you figure it out where daru-view gem will be installed when a user run Can you remove these JS files and build a local gem using So users should not run any command after the installation right? Gem should be able to handle this task automatically when the internet is available (what should it do when the internet is not available while installing the gem? Can it generate the charts without internet as well - may be we can do some changes in our code and rather than loading the js file we can use script tag provided the link)
It seems you deleted the js files of your cloned repo folder. |
The gem will be found in |
We can see the gem size here : https://rubygems.org/gems/daru-view
Looks like our dummy_iruby notebook examples and js files increasing the gem size.But
Is there anything else that causes, this much size ?
The text was updated successfully, but these errors were encountered: