#10753 closed enhancement (fixed)
inline the evalScript function in manipulation.js as it's only used once
Reported by: | mikesherov | Owned by: | mikesherov |
---|---|---|---|
Priority: | low | Milestone: | 1.7.2 |
Component: | manipulation | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
As far as I can tell, there is no reason to have this be a named function and can be inlines. Can save some bytes, so... 1.8?
Change History (15)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Please, try and not be overzealous. It makes sense to have this portion of the code in a separate function from a maintenance perspective. I like the idea of saving bytes like anyone else but, by the same reasoning, jQuery itself would be one big function ;)
As a side note, wouldn't it be more productive to have a code review in an oksoclap or google docs rather than a myriad of tickets and pull requests? That way, you can pinpoint the opportunities for DRY and byte savings and yet have the whole team review it first before making a PR for each line :)
comment:3 follow-up: 7 Changed 12 years ago by
jaubourg, from my perspective, when a function gets called twice, that's when it makes sense to have it be a separate function.
If you feel otherwise, as maintainability is mostly subjective, I'll respect that and defer to your expertise, but the idea that inlining a function that only gets called once would lead to jQuery being one big function is a slippery slope argument. On the flip side, I can make a slippery slope argument that all callbacks should be defined in there own functions in case we ever need to reuse them.
With regards to using google docs, I'm cool with that, I wasn't aware that was something commonly done by the team. How do I go about getting the team's attention if I create a google doc for all those changes?
comment:4 Changed 12 years ago by
P.S. thanks for the feedback. I appreciate the time you're taking to help get me to be my most effective.
comment:5 Changed 12 years ago by
As far as timing goes, I'd like to wait until we finish the crush of 1.7.1 to keep the pull queue clean. These could wait for 1.8 unless they're critical for other reasons such as fixing bugs.
comment:7 Changed 12 years ago by
I dunno who's in charge of this but maybe getting onto the jquery bug team mailing list would be a good first step given how active you've been lately :)
Dave?
Replying to mikesherov:
jaubourg, from my perspective, when a function gets called twice, that's when it makes sense to have it be a separate function.
If you feel otherwise, as maintainability is mostly subjective, I'll respect that and defer to your expertise, but the idea that inlining a function that only gets called once would lead to jQuery being one big function is a slippery slope argument. On the flip side, I can make a slippery slope argument that all callbacks should be defined in there own functions in case we ever need to reuse them.
With regards to using google docs, I'm cool with that, I wasn't aware that was something commonly done by the team. How do I go about getting the team's attention if I create a google doc for all those changes?
comment:8 Changed 12 years ago by
@jaubourg the bugs team mailing list was recently made public for reading, but only bugs team members can actually post to it.
@mikesherov - I've sent you an invite to the bugs team mailing list. This will give you posting permission
comment:9 Changed 12 years ago by
@rick I knew about the list being made public, I was obviously talking about posting permission
comment:10 Changed 12 years ago by
Component: | unfiled → manipulation |
---|---|
Milestone: | None → 1.8 |
Owner: | set to mikesherov |
Priority: | undecided → low |
Status: | new → assigned |
comment:11 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
this will be fixed when JSHint is implemented here: https://github.com/jquery/jquery/pull/602/files#L14L359
comment:12 Changed 12 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
comment:13 Changed 12 years ago by
Status: | reopened → assigned |
---|
comment:14 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix #10753. Inline evalScript as it's only used in one place
Changeset: 07866a04ddcac0b912cd0a7e382fea8667b32d0e
comment:15 Changed 12 years ago by
Milestone: | 1.8 → 1.7.2 |
---|
https://github.com/jquery/jquery/pull/591