Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15743#discussion_r86582778
  
    --- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala ---
    @@ -885,8 +885,8 @@ private[spark] object JsonProtocol {
         if (json == JNothing) {
           return null
         }
    -    val executorId = (json \ "Executor ID").extract[String]
    -    val host = (json \ "Host").extract[String]
    +    val executorId = (json \ "Executor ID").extract[String].intern()
    +    val host = (json \ "Host").extract[String].intern()
    --- End diff --
    
    From reading http://java-performance.info/string-intern-in-java-6-7-8/ it 
seems significantly safer in Java 7 (I also had the impression from tribal lore 
that `intern()` had been a bad idea in older JVMs) but not necessarily great 
for performance if you're going to intern hundreds of thousands of strings. But 
if this is a pretty targeted use for a hotspot, seems OK.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to