Return-Path: X-Original-To: apmail-zest-dev-archive@minotaur.apache.org Delivered-To: apmail-zest-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6294C17978 for ; Fri, 22 May 2015 04:58:41 +0000 (UTC) Received: (qmail 76663 invoked by uid 500); 22 May 2015 04:58:41 -0000 Delivered-To: apmail-zest-dev-archive@zest.apache.org Received: (qmail 76628 invoked by uid 500); 22 May 2015 04:58:41 -0000 Mailing-List: contact dev-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list dev@zest.apache.org Received: (qmail 76610 invoked by uid 99); 22 May 2015 04:58:40 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2015 04:58:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6FDA41A3972 for ; Fri, 22 May 2015 04:58:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id JWpXcJTWi4aO for ; Fri, 22 May 2015 04:58:39 +0000 (UTC) Received: from mail-ig0-f175.google.com (mail-ig0-f175.google.com [209.85.213.175]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 16D6524B1E for ; Fri, 22 May 2015 04:58:39 +0000 (UTC) Received: by igcau1 with SMTP id au1so24875108igc.1 for ; Thu, 21 May 2015 21:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=0DPzulj56R+1DxEyqBC/3zLcAHHt4fXAYiV7n/9x8c0=; b=riiHV1zv2Nak3jGCSD5SToQ8RveN9M4Ng5b/lMMbkVJSvmjbQ6lY34QZllWnejkL+i p5n1avoxhGw7qYDkuZughymlinNMXhJV5i7hCNmgvMMMGqgAqEUDIrgypDvrPap2Tgqn UMI3kCaQxWPRa24nFlPoxAIcvBgzYA2+XGk8MP4TmVinO8s6+0ULJGdR7StdGA+9ASGN 1YYd5o4JoMjbdV7ps7/ARtGGzIjsVZzzlel6xJbLkYZzjlFMggbv14XOmT9nw68VaUAY pqo+fMsLOnxiUaMR68W1SVf3o35Ykww01A5XGZe1/ztMabQ4RQV/Vy5MuaO6cCSZKlk4 Dq0g== X-Received: by 10.107.8.144 with SMTP id h16mr8311816ioi.49.1432270717830; Thu, 21 May 2015 21:58:37 -0700 (PDT) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.36.98.18 with HTTP; Thu, 21 May 2015 21:58:17 -0700 (PDT) From: Niclas Hedhman Date: Fri, 22 May 2015 12:58:17 +0800 X-Google-Sender-Auth: pZme0ImF3xhWVRzcDkoRWSEVyFw Message-ID: Subject: Prototype cloning? To: dev Content-Type: multipart/alternative; boundary=001a113f91565bd0000516a4832d --001a113f91565bd0000516a4832d Content-Type: text/plain; charset=UTF-8 There is this sub-optimal section in the ValueBuilderWithPrototype.java // @TODO there is probably a more efficient way to do this ValueSerialization valueSerialization = currentModule.valueSerialization(); String serialized = valueSerialization.serialize( prototype ); value = valueSerialization.deserialize( valueModel.valueType(), serialized); And this approach is of course a performance hog, as well as introducing a strange problem about initializing ValueComposites with Associations. And it should be required to clone via serialization, but I understand that the effort might be substantial... Any takers?? Cheers -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java --001a113f91565bd0000516a4832d--