This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Steps to reproduce: In new 'HTML5 Application' creation dialog, step 4 (JavaScript Files) press 'update' (update the list of JavaScript libaries). NetBeans starts a large file download (285.8 MB) without any notification to the user. 'https://github.com/cdnjs/cdnjs/archive/master.zip' GitHub, where the file is hosted throttles the download of this file down to ~25-40 KB/sec, so the download will take approximately 2.5 hours. Meanwhile NetBeans IDE uses a big amount of CPU resources. Expected behaviour: 1. On pressing 'update' NetBeans IDE should only update the list of available libraries (download small text file ) and their current version; 2. Download only selected JavaScript libraries on demand (smaller download size); 3. Do not load the CPU while updating and downloading. - - - - Product Version = NetBeans IDE 8.0 RC1 (Build 201402242200) Operating System = Mac OS X version 10.9.2 running on x86_64 Java; VM; Vendor = 1.7.0_51 Runtime = Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Better solution: 1. On pressing 'update'-Label, only a list of JS-libraries should be downloaded from 'http://cdnjs.com/packages.json' (~7.5 MB). 2. Parse the downloaded JSON-file, and fill the table. 3. Download only user selected JS-libraries on demand, by generating a link from the following template: 'http(s)://cdnjs.cloudflare.com/ajax/libs/{name}/{version}/{filename}' (e.g. 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.10/angular.min.js') PS: I can provide source code (patch) for this solution. Just get in touch with me.
(In reply to vlntyn from comment #1) > PS: I can provide source code (patch) for this solution. Just get in touch > with me. If you could do that, it would be perfect! Thanks a lot!
BTW this change would mean that you must be online in order to install JS library - not sure if it is a problem or not (likely not, the same applies for the bundled JS libraries). Thanks.
(In reply to Tomas Mysik from comment #2) To make it clear... the patch is not written yet, but I can make one. What I need is time and some assistance (never worked on NetBeans code before). As far as I understand, the module I have to work on is called 'web.clientproject.api'. What are the requirements to compile the module? 'cd web.clientproject.api && ant' doesn't compile... Greetings
(In reply to vlntyn from comment #4) > To make it clear... the patch is not written yet, but I can make one. > What I need is time and some assistance (never worked on NetBeans code > before). I would be more than happy to help you with it, of course. A good start is our FAQ for developers, see [1] (pick just what is interesting for you). Do not hesitate to write me directly to my e-mail. > As far as I understand, the module I have to work on is called > 'web.clientproject.api'. Yes, the class you need to improve is CDNJSLibrariesProvider - all the operations are there (reading & updating the libraries). There is also a test for it (CDNJSLibrariesProviderTest) so please, improve it if possible to verify that it works as expected. One note: I am not sure whether it will be possible to implement the JS libraries as you intent to do since we use common Library API and there could be some limitations - you will see :) > What are the requirements to compile the module? > 'cd web.clientproject.api && ant' doesn't compile... Basically, the good start to work with NB sources is this wiki page [2]. If one wants to provide a patch, it should be easy since NB uses Mercurial - please, have a look at this wiki page how to do that [3]. BTW it is a good idea to build only e.g. PHP cluster (it takes much less time than the whole IDE): ant -Dcluster.config=php build-nozip Thanks a lot! [1] http://wiki.netbeans.org/NetBeansDeveloperFAQ [2] http://wiki.netbeans.org/WorkingWithNetBeansSources [3] http://wiki.netbeans.org/HgHowTos
Hi, I think there another problem related, when I update the cdnjs file the download doesn't take so much time but the js libraries list is stucked in a infinite "loading...", cleaning the cache does't resolve the problem, tell me if I have to open a new issue. Thank you - - - - Product Version: NetBeans IDE 8.0 (Build 201403101706) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Windows 7 version 6.1 running on amd64; Cp1252; it_IT (nb)
@ikarus.nc: Yes, please, submit a new issue and attach a profiler snapshot [1] taken during the infinite loading. Thanks. [1] http://wiki.netbeans.org/FaqProfileMeNow
This bug is really painful! My Netbeans is "Updating JavaScript libraries" at 39% after 2 hours+. I'd scheduled some work time to sink my teeth into a new HTML5 project and it's totally stopped me in my tracks - for hours! It's a pretty serious bug I think. Comment 1 sounds like a logical approach to a solution. (only download the latest file list, then download only the selected libraries). Any news on this?
Yes, this issue will be solved in the next NetBeans version. Thanks.
I believe that, instead of downloading the packages.json file, it would be much better to use the API as described here: https://github.com/cdnjs/cdnjs#api Not only because it's an official, supported way. But also because it's much more efficient: firstly, the packages.json contains plenty of data that NetBeans doesn't need. And secondly, with the API you can define the fields you want to retrieve & add a search query. E.g. retrieving a list of all libraries, with just "name", "version" and "latest" (a link to the latest version) is only 112.51 KB (using http://api.cdnjs.com/libraries?fields=version). What do you think?
@terje7601: Try the dev build of NetBeans ;)
(In reply to Tomas Mysik from comment #11) > @terje7601: Try the dev build of NetBeans ;) :) That's just great, thanks. Upon trying it out, I encountered a couple of issues: * when trying to download the "d3" library, I got this exception: http://statistics.netbeans.org/analytics/exception.do?id=748843 * when downloading libraries, like "jquery" & "jquery-ui", a lot of files contain garbage. For example this file http://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/css/jquery.ui.all.css is downloaded as garbage (lots of squares etc.) Just a wild guess: maybe the files are not "gzip decompressed"? * NetBeans considers the latest version of jquery to be "2.1.1-rc2", even though the actual latest version is "2.1.1"
(In reply to terje7601 from comment #12) > * when downloading libraries, like "jquery" & "jquery-ui", a lot of files > contain garbage. For example this file > http://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/css/jquery.ui.all.css > is downloaded as garbage (lots of squares etc.) Just a wild guess: maybe the > files are not "gzip decompressed"? It could be some encoding issue, it works fine for me. I'll try it later on non UTF8 system. > * NetBeans considers the latest version of jquery to be "2.1.1-rc2", even > though the actual latest version is "2.1.1" Reported as #248426, thanks for catching that
(In reply to Vladimir Riha from comment #13) > (In reply to terje7601 from comment #12) > > * when downloading libraries, like "jquery" & "jquery-ui", a lot of files > > contain garbage. For example this file > > http://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/css/jquery.ui.all.css > > is downloaded as garbage (lots of squares etc.) Just a wild guess: maybe the > > files are not "gzip decompressed"? > > It could be some encoding issue, it works fine for me. I'll try it later on > non UTF8 system. I reported this as bug 248453, as I have found "evidence" that it's actually due to gzip compression.
I am still seeing the problem reported earlier - once the update finally finished, there is an infinite "loading"....version 8.0.2....just wasted a few days trying out Netbeans for HTML5 development only to be stuck on this.... ikarus.nc@netbeans.org 2014-04-14 10:20:24 UTC Hi, I think there another problem related, when I update the cdnjs file the download doesn't take so much time but the js libraries list is stucked in a infinite "loading...", cleaning the cache does't resolve the problem, tell me if I have to open a new issue. Thank you - - - -
Upcoming 8.1 will have new and better way to handle JS libraries. It is already implemented for CDNJS libraries, you can try it in nightly Dev build from http://bits.netbeans.org/download/trunk/nightly/latest/
(In reply to Vladimir Riha from comment #16) > Upcoming 8.1 will have new and better way to handle JS libraries. It is > already implemented for CDNJS libraries, you can try it in nightly Dev build > from http://bits.netbeans.org/download/trunk/nightly/latest/ I have faced the same problem (downloading 1.5GB, taking time, then failing). The new way is great and much more efficient.
With a root server with high bandwith: 2,35G 21,8MB/s in 2m 3s