Extension Talk
@ikram002p Heres the post xD
ok start , why its more flexible/fast than before ?
Anchient chinese secret XD
But in all seriousness, First off i optimized various JS (not all, still have LOTS of work to do)
come on i thought it would be open source extension xD
I then fixed some CSS errors that where just repetitive causing unneeded CPU stress
Its not
about 80% of the extension is server side lel
only 20% is the JS and CSS x'D
This helps relieve lag from the extension greatly as well xD
Also i optimized various JSON Data... So that helps.
There's other things i still need to do though xD
yeah, also adding it to chrome was fast i thought its external server
Theres litterally basically Nothing in the extension, its just a JS command pulling in the scripts from my server... or rather leading to a assets file leading to all the files
http://ultrilliam.com/openstudy-enhancment/test-1/savedata.php This is the user save data string... Which soon will replace looking through a bunch of files for everything (server side scripts)
It will only display data from the user currently logged in
neat!
the encryption mechanism as well as loading a specific key to login a user was a pain... This way nobody could cheat the system logging into another user... you physically have to login as a user on os for it to work... That in itself was hell to do... xD
i didn't know that os have such cute bug xD
anyway gtg now. again nice work Bravo. keep the question open so people would ask u more.
Will do :p
@TheSmartOne @Nnesha @pooja195 @AlexandervonHumboldt2 @GreenCat This would be the place to ask questions, or suggest, things about the extension... Etc Etc
Thanks
I think todays project will be the desktop notifications making a return and being configurable... :P
Interesting, :)
No.
What do you mean "no"? ._.
HEY POOJA
@pooja195
did you get the notification? O_o
no
Eh... WHOOPS i enabled it for mathmale LOL
-_-
THIS IS SEWIOUS
|dw:1451790783209:dw|
how so? ._.
Wait pooja... Eh... Hang on...
|dw:1451790823592:dw|
Pooja? ._.
|dw:1451790895865:dw|
Okay im starting to get annoyed... ._.
im getting it
stop spamming
IM spamming? >-<
my notifications thingy
One last pic |dw:1451791038172:dw|
Okay where you getting the notification when i tagged you?
pop ups
Yes... where you trolling me? Where you actually getting them? :/
No i got them as pop ups
Yes... ._.
Notifications like when i was tagging you... Hang on let me know if you get this
everytime you message me
So when i tagged you, you got it?
yes it cam as a poop up
Poop up?
lel
i mean pop up sorry
Ok good... Now all i need is the menu to be able to change the settings LOL
give memy a back >_>
give what now back? O-o
OH
Sorry, it was causing errors cause your user wasnt defined on page load... Sozzry xD
Just annoying... Not really harmfull errors ._. (annoying as in taking up console room... LOL)
Actually the extension causes more CPU stress, injection is costly. Plus loading from remote rather than local is also damaging. It adds the need for an extra DNS resolve.
^True, this is why i actually only inject a script to add a <script> tag, then it adds the other various <script> tags, so it loads as though it was the normal os document... it adds minimum stress, which is what allowed me to achieve higher speed, I then added the various bug fixes and client side script errors to speed the normal OS up. :P
Im glad theres someone else here who has knowledge xD
@Jaynator495 Chrome has some really good profiling tools, you may actually want to profile your extension.
Alright, done... What i came up with was my extension uses 20-50 (tops)mb of memory... and hardly any CPU (2%-10% max on a celeron dual core @1.50Ghz).. I'm careful about adding new features and take into account how much lag they may cause. if my extension never lost memory usage, and would only go up, in 7.5 minutes it would use 200mb-1gig(tops) of memory. This is of course because of the JQuery in the beginning used to append everything, meaning when eventually i get to implement my extension side by side with OpenStudy everything will be located where it should, and use much much less. (assuming i'm the one that gets to add it and not OS!) However openstudy in 7.5 mins if it didn't stop using memory, (as in it never lost any memory usage and just kept going up) will use 128 GIGS of memory... HOLY CRAP... 110GB-127GB from KnockOut events! WOW... And this is why i need to fix OS so it no longer uses knockout! or at least update it where maybe it uses less memory, don't know haven't looked into it xD
WHOOPS I GAVE THE WRONG LINK!
@pooja195 's post i cant😂😂the phone the phone is ringing!
I thought i was on my extension pot XD
so what is this?
@Jaynator495 your extension initializes at 42307 kB for me, on initial page loads the CPU usage spikes to 100% which can induce tab hangs. If you are certain on going this route use RequireJS which would likely fix and accomplish what you want to do. My primary beef with it is it requires downloads from a web server, which is horribly slow on dial-up. (Yes, dial-up is still common.) Another nit pick, you say: > 128 GIGS ... lord almighty how much RAM does your computer have?
LOL, Jay has like a lot of computers ;p
But I know that doesn't mean the RAM adds up. He'll just have to list how much he has on each one :P
@TheSmartOne one browser in use = one amount of RAM usage. You do not add it up.
I know :P
\(\color{#0cbb34}{\text{Originally Posted by}}\) @Opcode @Jaynator495 your extension initializes at 42307 kB for me, on initial page loads the CPU usage spikes to 100% which can induce tab hangs. If you are certain on going this route use RequireJS which would likely fix and accomplish what you want to do. My primary beef with it is it requires downloads from a web server, which is horribly slow on dial-up. (Yes, dial-up is still common.) Another nit pick, you say: > 128 GIGS ... lord almighty how much RAM does your computer have? \(\color{#0cbb34}{\text{End of Quote}}\) Doesn't download things infact! anything that is cached the next session is used in a fresh copy to prevent errors... mostly because ill update things, this will eventually change when it is implemented into OS. and oh my god what processor are you using? O_o OpenStudy ITSELF can only get up to 50% WITH the extension on a OLD LOW QUALITY celeron processor! And lets see... 16gb in one 8gb in another 128gb in another 256gb in another (got bored, built a RAM/CPU machine XD... should really set it up as a server at some point) 4gb in 5... 2gb in 9... 1gb in 2 sitting in my hallway... and 256mb in computers i dont know why arent yet in the trash...
> Doesn't download things infact! It very much does, it downloads CSS, and JavaScript files off of your server last time I checked. HTTP transfers are downloads. > anything that is cached the next session is used in a fresh copy to prevent errors... mostly because ill update things, this will eventually change when it is implemented into OS. For performance reasons that is abhorrent. Not to mention completely breaks the policy of allowed extensions on the Chrome Store. https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/cfM_rfRC9fM/-1mfK7HF7e8J Setting aside the legal issues, DNS resolution, connecting to a remote server, etc all add overhead. > and oh my god what processor are you using? O_o Currently on a Intel (R) Core (TM) i7-6700K (not mine classmates.) > And lets see... 16gb in one 8gb in another 128gb in another 256gb in another (got bored, built a RAM/CPU machine XD... should really set it up as a server at some point) 4gb in 5... 2gb in 9... 1gb in 2 sitting in my hallway... and 256mb in computers i dont know why arent yet in the trash... No one of those machines have 128 GB? How do you know it will grow that big if none of your machines have that much RAM? > and 256mb in computers i dont know why arent yet in the trash... ... because that would be wasteful.
\(\color{#0cbb34}{\text{Originally Posted by}}\) @Opcode > Doesn't download things infact! It very much does, it downloads CSS, and JavaScript files off of your server last time I checked. HTTP transfers are downloads. > anything that is cached the next session is used in a fresh copy to prevent errors... mostly because ill update things, this will eventually change when it is implemented into OS. For performance reasons that is abhorrent. Not to mention completely breaks the policy of allowed extensions on the Chrome Store. https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/cfM_rfRC9fM/-1mfK7HF7e8J Setting aside the legal issues, DNS resolution, connecting to a remote server, etc all add overhead. > and oh my god what processor are you using? O_o Currently on a Intel (R) Core (TM) i7-6700K (not mine classmates.) > And lets see... 16gb in one 8gb in another 128gb in another 256gb in another (got bored, built a RAM/CPU machine XD... should really set it up as a server at some point) 4gb in 5... 2gb in 9... 1gb in 2 sitting in my hallway... and 256mb in computers i dont know why arent yet in the trash... No one of those machines have 128 GB? How do you know it will grow that big if none of your machines have that much RAM? > and 256mb in computers i dont know why arent yet in the trash... ... because that would be wasteful. \(\color{#0cbb34}{\text{End of Quote}}\) 1st, technically the download is not required... It executes first then caches the file. I use a workaround to get a fresh copy each time, but since the download comes after the exacution, it in itself is not a download... That is unless i misunderstand the system... Dont know, haven't looked to much into it... Who reads terms and conditions anymore? xD Well clearly you were lying about the 100% CPU, as that would then be impossible considering i cant even get it to 10% on a quad core i5 @3.00Ghz None of the practical use machines anyway, typically im either on the 16GB (gaming computer, userd more for coding due to its speed) or on a 4GB laptop. And because the chrome profile tools tell you the total ram used, total ram used assuming no ram usage went away and it only piled up. wastefull to throw a computer away that is stuck in windows ME? I hardly see how xD
\(\color{#0cbb34}{\text{Originally Posted by}}\) @Jaynator495 lel \(\color{#0cbb34}{\text{End of Quote}}\) \(\color{#0cbb34}{\text{Originally Posted by}}\) @Jaynator495 about 80% of the extension is server side lel \(\color{#0cbb34}{\text{End of Quote}}\) I HAVE BEEN SUMMONED! BY THE POWER OF THE "LEL"!!1
> 1st, technically the download is not required... It executes first then caches the file. I use a workaround to get a fresh copy each time, but since the download comes after the exacution, it in itself is not a download... That is unless i misunderstand the system... Dont know, haven't looked to much into it... You are brutally misrepresenting what HTTP transfers are considered as, see RFC 2616. Anyone seeing as you did not comment on the resolutions, I suppose you agree they do add overhead. > Who reads terms and conditions anymore? xD ... seriously? You do realize OpenStudy has a very strict and ridge policy on following the Terms and Conditions. > Well clearly you were lying about the 100% CPU, as that would then be impossible considering i cant even get it to 10% on a quad core i5 @3.00Ghz Such a lame accusations, I cannot see why you would make it. Firstly I am talking about on initialization (each injection the CPU usage jumps), secondly it fully is rational for someone to hit 100% CPU usage on initialization, for instance when V8 uses both x87 registers, and SSE registers, expect register starvation. (I do this for regression testing stuff, other Chromium developers run builds like mine.) > And because the chrome profile tools tell you the total ram used, total ram used assuming no ram usage went away and it only piled up. It shows you added history of allocations true, but you can set it to show the working RAM. Not sure why you started listing your RAM. > wastefull to throw a computer away that is stuck in windows ME? I hardly see how xD 256 MB of RAM is enough to run a version of Linux or *BSD. Maybe you do not see the good in OLPC, that is just me though. The main points of my posts are clear.
You win this round :P
but your point will be mute when/if this gets implemented side by side with OS... Also... ``` function loadjscssfile(filename, filetype){ if (filetype=="js"){ var fileref=document.createElement('script') fileref.setAttribute("type","text/javascript") fileref.setAttribute("src", filename) } else if (filetype=="css"){ var fileref=document.createElement("link") fileref.setAttribute("rel", "stylesheet") fileref.setAttribute("type", "text/css") fileref.setAttribute("href", filename) } if (typeof fileref!="undefined") document.getElementsByTagName("head")[0].appendChild(fileref) } ``` I think thats better then using a library to load scripts
@Opcode Not sure if you saw this...
I am familiar with that style, you inject by passing stuff to loadjscssfile(). It has the downside of being synchronous.
I'm unfamiliar to why that is a downside? ._.
Join our real-time social learning platform and learn together with your friends!