From user-return-8041-archive-asf-public=cust-asf.ponee.io@uima.apache.org Wed Feb 20 14:58:56 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 66D7C18075F for ; Wed, 20 Feb 2019 15:58:55 +0100 (CET) Received: (qmail 53567 invoked by uid 500); 20 Feb 2019 14:58:54 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 53538 invoked by uid 99); 20 Feb 2019 14:58:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2019 14:58:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 1C764C2719 for ; Wed, 20 Feb 2019 14:58:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.009 X-Spam-Level: ** X-Spam-Status: No, score=2.009 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=mazancourt-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 6T_97OYzovh7 for ; Wed, 20 Feb 2019 14:58:50 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 799385F3DF for ; Wed, 20 Feb 2019 14:49:52 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id v13so26273712wrw.5 for ; Wed, 20 Feb 2019 06:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mazancourt-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version; bh=ULTCmt+6fiKzeurs4YMi3RumV7MQ+sYXA26ZwOdUHH4=; b=OhsfkXLYb9Sf3vbPlNFUL9NmMbQPG+sJdvvoQIMCybx3slvmTOH0LClQhvtpnuNVb1 rXef37FS8gJ9BOgODsXVi1WMH3HCwOs9+w3Z3YyUk25XCuEXnELzaRm3L1lk3Tit0+fJ jTUrmo4Grq25lh5eKXKPYuyW51P72EPv+b0StDLgY6hmllQa4emOxckSGBLPd0ZpQlJX aE8vQQBG/TTpcn7N3nH4Eugxa9/plbXujDqJXqZriwQOuCer5N9W5FBbiizoP96sRz59 aV5d0NVZj9nLOxHqEiUfN1+Ulhz//ixxNoygUsYtKUPvgMqUMx2q9/tRdiJa/3hFF7BF qLdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version; bh=ULTCmt+6fiKzeurs4YMi3RumV7MQ+sYXA26ZwOdUHH4=; b=rFNfq3v2RkuJ3DJhH/LnaqDHAkME5Ov2IjC7iaB3tv2QdDCgCKfziBg3aYQY6CvGAK oDcv++0DQEoqfsfkreMm1UqD58fIuvx16VSAFOx8Vk9rYb5D4nYGCk39GOSV/Irn1Tfj SPA/LAJobFdOpIq+oG2DnAP5L/6fPvHWZXC2Zq/qC1eyPHdtO0uGlEZ5+a0m9h+q6peC EohDSvNXYM5+MAlMKMqT3Yp4HTKj2wE/VRfsl8WfOXxAWLcBxYEmrah6Y7ooaxqlzobP kXdoyCv7Cc3FFgWVpook0QFb5IVTj7RbicZRCc5t4PsBu1AtbH7jToYoWNvAb0hjpvgt 8u0g== X-Gm-Message-State: AHQUAuZwVLxD3bfZKL46ECgtYv3ICt04HFZfzRayzFh6mD0Lj/SxZjj4 AFJoQJyYpKLQTM7Hdt0k0I4x71fxJa1mVA== X-Google-Smtp-Source: AHgI3IZL9kaRkPKCjvqVKg8eRzMSY27uU6aKq+RfJU4iYunpQlyIlWyS45DDOI7kt8ypePhYbDiKNA== X-Received: by 2002:adf:e34e:: with SMTP id n14mr26172976wrj.195.1550674185072; Wed, 20 Feb 2019 06:49:45 -0800 (PST) Received: from hodor ([37.97.76.230]) by smtp.gmail.com with ESMTPSA id s3sm4486701wmj.23.2019.02.20.06.49.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Feb 2019 06:49:43 -0800 (PST) Date: Wed, 20 Feb 2019 15:49:40 +0100 From: Hugues de Mazancourt To: "=?utf-8?Q?user=40uima.apache.org?=" Cc: "=?utf-8?Q?user=40uima.apache.org?=" Message-ID: <1550673806.local-8c76d2ef-041b-v1.5.6-4cb1851b@getmailspring.com> In-Reply-To: <5E5D3C66-068B-498E-B234-844189F25C38@gmail.com> References: <5E5D3C66-068B-498E-B234-844189F25C38@gmail.com> Subject: Re: Uima and spring X-Mailer: Mailspring MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="5c6d6904_714a90e7_5910" --5c6d6904_714a90e7_5910 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Sarah, Sorry it didn't solve your issue. Do all resources get reloaded or just specific ones =3F DKPro's components usually perform a check on the JCas typesystem and rel= oad the resource if the TS changed. This happen as a prolog in every call= to process(). Thus if the components =22feels=22 that the typesystem has changed for so= me reason, this will trigger a reload of the corresponding resource. Do you use standard DKPro resource management (through language/variant) = or use an explicit location for your resource (PARAM=5FRESOURCE=5FLOCATIO= N, ...) =3F Best, Hugues de Mazancourt P: 06.72.78.70.33 (tel:06.72.78.70.33) W: http://www.mazancourt.com On f=C3=A9vr. 19 2019, at 3:25 pm, Sarah wrote: > Hi all, > > Thanks for the advice=21 > I have created a JCasPool with - for now - only one JCas instance. I ru= n my analysis engines on it, use the results, reset the JCas and release = it back into the pool. Then I start the same process on the same JCas. > However, the resources still get produced every single time I call =E2=80= =9Cprocess=E2=80=9D on my aggregate engine. I assumed that the resource m= anagement would be taken care of during JCas creation. But that is not th= e case. > > Does anyone know where exactly the =E2=80=9Cinitialize=E2=80=9D method = of JCasAnnotator is called=3F > Sarah > > On 18. =46eb 2019, at 17:04, Marshall Schor wrote: > > Hi Sarah, > > I don't have knowledge of DKPro or Spring, but here's some general gu= idance, > > which may (or may not) be of use :-). > > > > External Resources are associated with a Resource Manager instance. > > Try figuring out how to have one Resource Manager instance be reused = for > > multiple JCas instances. > > > > Also, try to not have multiple JCas instances, beyond what you need t= o keep all > > the cpu =22cores=22 in your host busy. > > Instead of one new JCas instance per piece of work, reusing existing = instances, > > by calling myJCasInstance.reset() and then using it again. > > > > Hopefully others with specific knowledge may comment also. > > -Marshall > > On 2/18/2019 6:48 AM, Sarah wrote: > > > Hi, > > > > > > I am using uimafit annotators in a spring component. These annotato= rs use external resources. These resources are currently produced for eve= ry JCas even though the Aggregate Engine is created inside of the Spring = component's init and merely the process method is called on the individua= l JCas objects. This slows my system down. > > > How do I handle external resources appropriately in a spring compon= ent. I found the SpringContextResourceManager but I don=E2=80=99t know ho= w to use it. Can you point me to an example where e.g. the DKPro CoreNLP = Annotators are used in a spring context=3F > > > > > > All the best, > > > Sarah > > > > --5c6d6904_714a90e7_5910--