ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:41440] [Ruby 1.8 - Bug #5698][Open] rexml Encoding logic creates unnecessary singleton classes, aliases at runtime
@ 2011-12-01 23:38 Charles Nutter
  2011-12-01 23:39 ` [ruby-core:41441] [Ruby 1.8 - Bug #5698] " Charles Nutter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Charles Nutter @ 2011-12-01 23:38 UTC (permalink / raw
  To: ruby-core


Issue #5698 has been reported by Charles Nutter.

----------------------------------------
Bug #5698: rexml Encoding logic creates unnecessary singleton classes, aliases at runtime
http://redmine.ruby-lang.org/issues/5698

Author: Charles Nutter
Status: Open
Priority: Normal
Assignee: 
Category: lib
Target version: Ruby 1.8.7
ruby -v: 1.8.7 head


The logic for switching a given parser to a new encoding currently does the following:

* Reopens the Encoding module (only on first use of the encoding)
* Defines two new methods for the encoding being applied (only on first use)
* Singletonizes the parser object and aliases the encoding-specific methods to "encode" and "decode"

This last phase is unnecessary, but happens at runtime whenever an encoding is applied to a parser. The resulting singletonizing and method aliasing causes cache flushes.

I have created a patch that does not use this singleton logic and which will not cause any singletons or method table updates at steady-state.

https://gist.github.com/1420708

I know 1.8.7 is only in security patch mode, but I thought I'd throw this out there. JRuby will probably apply it to our fork of 1.8.7 stdlib.


-- 
http://redmine.ruby-lang.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:41441] [Ruby 1.8 - Bug #5698] rexml Encoding logic creates unnecessary singleton classes, aliases at runtime
  2011-12-01 23:38 [ruby-core:41440] [Ruby 1.8 - Bug #5698][Open] rexml Encoding logic creates unnecessary singleton classes, aliases at runtime Charles Nutter
@ 2011-12-01 23:39 ` Charles Nutter
  2012-11-16 16:32 ` [ruby-core:49441] " headius (Charles Nutter)
  2012-11-16 23:52 ` [ruby-core:49464] [Ruby 1.8 - Bug #5698][Rejected] " kou (Kouhei Sutou)
  2 siblings, 0 replies; 4+ messages in thread
From: Charles Nutter @ 2011-12-01 23:39 UTC (permalink / raw
  To: ruby-core


Issue #5698 has been updated by Charles Nutter.


Oops, I realized that also has my baseparser.rb patch. It can be ignored; there's a separate bug for that applied against ruby-trunk. I'd love to see that backported to 1.8.7, but it's not related to this bug.
----------------------------------------
Bug #5698: rexml Encoding logic creates unnecessary singleton classes, aliases at runtime
http://redmine.ruby-lang.org/issues/5698

Author: Charles Nutter
Status: Open
Priority: Normal
Assignee: 
Category: lib
Target version: Ruby 1.8.7
ruby -v: 1.8.7 head


The logic for switching a given parser to a new encoding currently does the following:

* Reopens the Encoding module (only on first use of the encoding)
* Defines two new methods for the encoding being applied (only on first use)
* Singletonizes the parser object and aliases the encoding-specific methods to "encode" and "decode"

This last phase is unnecessary, but happens at runtime whenever an encoding is applied to a parser. The resulting singletonizing and method aliasing causes cache flushes.

I have created a patch that does not use this singleton logic and which will not cause any singletons or method table updates at steady-state.

https://gist.github.com/1420708

I know 1.8.7 is only in security patch mode, but I thought I'd throw this out there. JRuby will probably apply it to our fork of 1.8.7 stdlib.


-- 
http://redmine.ruby-lang.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:49441] [Ruby 1.8 - Bug #5698] rexml Encoding logic creates unnecessary singleton classes, aliases at runtime
  2011-12-01 23:38 [ruby-core:41440] [Ruby 1.8 - Bug #5698][Open] rexml Encoding logic creates unnecessary singleton classes, aliases at runtime Charles Nutter
  2011-12-01 23:39 ` [ruby-core:41441] [Ruby 1.8 - Bug #5698] " Charles Nutter
@ 2012-11-16 16:32 ` headius (Charles Nutter)
  2012-11-16 23:52 ` [ruby-core:49464] [Ruby 1.8 - Bug #5698][Rejected] " kou (Kouhei Sutou)
  2 siblings, 0 replies; 4+ messages in thread
From: headius (Charles Nutter) @ 2012-11-16 16:32 UTC (permalink / raw
  To: ruby-core


Issue #5698 has been updated by headius (Charles Nutter).


This should be fixed if 1.8 is still open, or closed if it is not.
----------------------------------------
Bug #5698: rexml Encoding logic creates unnecessary singleton classes, aliases at runtime
https://bugs.ruby-lang.org/issues/5698#change-32978

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee: 
Category: lib
Target version: Ruby 1.8.7
ruby -v: 1.8.7 head


The logic for switching a given parser to a new encoding currently does the following:

* Reopens the Encoding module (only on first use of the encoding)
* Defines two new methods for the encoding being applied (only on first use)
* Singletonizes the parser object and aliases the encoding-specific methods to "encode" and "decode"

This last phase is unnecessary, but happens at runtime whenever an encoding is applied to a parser. The resulting singletonizing and method aliasing causes cache flushes.

I have created a patch that does not use this singleton logic and which will not cause any singletons or method table updates at steady-state.

https://gist.github.com/1420708

I know 1.8.7 is only in security patch mode, but I thought I'd throw this out there. JRuby will probably apply it to our fork of 1.8.7 stdlib.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:49464] [Ruby 1.8 - Bug #5698][Rejected] rexml Encoding logic creates unnecessary singleton classes, aliases at runtime
  2011-12-01 23:38 [ruby-core:41440] [Ruby 1.8 - Bug #5698][Open] rexml Encoding logic creates unnecessary singleton classes, aliases at runtime Charles Nutter
  2011-12-01 23:39 ` [ruby-core:41441] [Ruby 1.8 - Bug #5698] " Charles Nutter
  2012-11-16 16:32 ` [ruby-core:49441] " headius (Charles Nutter)
@ 2012-11-16 23:52 ` kou (Kouhei Sutou)
  2 siblings, 0 replies; 4+ messages in thread
From: kou (Kouhei Sutou) @ 2012-11-16 23:52 UTC (permalink / raw
  To: ruby-core


Issue #5698 has been updated by kou (Kouhei Sutou).

Status changed from Open to Rejected

http://www.ruby-lang.org/en/news/2011/10/06/plans-for-1-8-7/ says "We continue to provide normal maintenance for 1.8.7 as usual, until June 2012. ... After that we stop bugfixes.". Now, "after June 2012" is true. So I close this.
----------------------------------------
Bug #5698: rexml Encoding logic creates unnecessary singleton classes, aliases at runtime
https://bugs.ruby-lang.org/issues/5698#change-32998

Author: headius (Charles Nutter)
Status: Rejected
Priority: Normal
Assignee: 
Category: lib
Target version: Ruby 1.8.7
ruby -v: 1.8.7 head


The logic for switching a given parser to a new encoding currently does the following:

* Reopens the Encoding module (only on first use of the encoding)
* Defines two new methods for the encoding being applied (only on first use)
* Singletonizes the parser object and aliases the encoding-specific methods to "encode" and "decode"

This last phase is unnecessary, but happens at runtime whenever an encoding is applied to a parser. The resulting singletonizing and method aliasing causes cache flushes.

I have created a patch that does not use this singleton logic and which will not cause any singletons or method table updates at steady-state.

https://gist.github.com/1420708

I know 1.8.7 is only in security patch mode, but I thought I'd throw this out there. JRuby will probably apply it to our fork of 1.8.7 stdlib.


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-16 23:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-01 23:38 [ruby-core:41440] [Ruby 1.8 - Bug #5698][Open] rexml Encoding logic creates unnecessary singleton classes, aliases at runtime Charles Nutter
2011-12-01 23:39 ` [ruby-core:41441] [Ruby 1.8 - Bug #5698] " Charles Nutter
2012-11-16 16:32 ` [ruby-core:49441] " headius (Charles Nutter)
2012-11-16 23:52 ` [ruby-core:49464] [Ruby 1.8 - Bug #5698][Rejected] " kou (Kouhei Sutou)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).