Re: [Simpleweb-Support] PollerInputStream
Brought to you by:
niallg
|
From: Brian D. <wic...@gm...> - 2005-12-13 00:01:50
|
Hey hey.. making both those changes to the code works great..
included is the coverage report for that class..
Thanks!
On 12/12/05, Niall Gallagher <gal...@ya...> wrote:
> Hi Brian,
>
> I have been testing this also. Does this have any ill
> effects? I have tested this on Linux and Windows and
> there are no problems? It works fine for both 1.4 and
> 1.5? Is this causing problems for you? I have noticed
> a rather large performance increase for Linux and
> Windows using the new PollerInputStream. If this is
> causing problems you can avoid blocking by changing
> line 175 from
>
> peek(); --> peek(1);
>
> And change line 105 from
>
> this.sock =3D sock; --> this.sock =3D pipe.sock;
>
> Niall
>
>
> --- Brian Davis <wic...@gm...> wrote:
>
> > Also happens on the following environment.
> >
> > Current Time is Mon Dec 12 15:57:37 CST 2005
> > Server is running at 127.0.0.1 port 2000
> > Java Version : 1.5.0_05
> > Java Vendor : Apple Computer, Inc.
> >
> > This affects the following classes:
> >
> > PollerInputStream
> > Poller
> > BasicPoller
> >
> > Thanks!
> >
> >
> >
> > On 12/12/05, Brian Davis <wic...@gm...>
> > wrote:
> > > Java(TM) 2 Runtime Environment, Standard Edition
> > (build 1.4.2_09-232)
> > > Java HotSpot(TM) Client VM (build 1.4.2-54, mixed
> > mode)
> > >
> > >
> > > On 12/12/05, Niall Gallagher
> > <gal...@ya...> wrote:
> > > > Hi Brian,
> > > >
> > > > Thanks for this, ill check this out. I assume
> > that you
> > > > are using Java 1.4?
> > > >
> > > > Niall
> > > >
> > > > --- Brian Davis <wic...@gm...> wrote:
> > > >
> > > > > When upgrading from 2.7.2 to 2.7.3 the new
> > > > > PollerInputStream breaks
> > > > > the regression tests in such a way that
> > reading
> > > > > multiple requests
> > > > > blocks until the configurator times out.
> > > > >
> > > > > The problem was fixed by going back to the old
> > > > > PollerInputStream that
> > > > > is based upon the PushBackInputStream
> > > > >
> > > > > test below:
> > > > >
> > > > > public void test1325() throws Exception
> > > > > {
> > > > > File dir =3D new File("test/carol");
> > > > >
> > > > > File[] list =3D dir.listFiles();
> > > > >
> > > > > for (int i =3D 0; i < list.length; i++)
> > > > > {
> > > > > File tmp =3D list[i];
> > > > >
> > > > > String path =3D
> > tmp.getAbsolutePath();
> > > > >
> > > > > int x =3D path.lastIndexOf('/');
> > > > >
> > > > > if (x !=3D -1)
> > > > > {
> > > > > path =3D path.substring(x+1);
> > > > > }
> > > > >
> > > > > HttpConfiguration config =3D new
> > > > > HttpConfiguration();
> > > > >
> > > > > config.setRequest("GET",
> > > > > "http://127.0.0.1:2000/carol/" + path);
> > > > >
> > > > > Client http =3D new Client();
> > > > >
> > > > > http.open(config);
> > > > > http.send();
> > > > >
> > > > >
> > Assert.assertTrue(http.getStatusCode()
> > > > > =3D=3D 200);
> > > > > }
> > > > > }
> > > > >
> > > > >
> > > > >
> > > >
> >
> -------------------------------------------------------
> > > > > This SF.net email is sponsored by: Splunk Inc.
> > Do
> > > > > you grep through log files
> > > > > for problems? Stop! Download the new AJAX
> > search
> > > > > engine that makes
> > > > > searching your log files as easy as surfing
> > the
> > > > > web. DOWNLOAD SPLUNK!
> > > > >
> > http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dclick
> > > > >
> > _______________________________________________
> > > > > Simpleweb-Support mailing list
> > > > > Sim...@li...
> > > > >
> > > >
> >
> https://lists.sourceforge.net/lists/listinfo/simpleweb-support
> > > > >
> > > >
> > > > Niall Gallagher
> > > >
> > > >
> > __________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam? Yahoo! Mail has the best spam
> > protection around
> > > > http://mail.yahoo.com
> > > >
> > > >
> > > >
> >
> -------------------------------------------------------
> > > > This SF.net email is sponsored by: Splunk Inc.
> > Do you grep through log files
> > > > for problems? Stop! Download the new AJAX
> > search engine that makes
> > > > searching your log files as easy as surfing the
> > web. DOWNLOAD SPLUNK!
> > > >
> >
> http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
> > > > _______________________________________________
> > > > Simpleweb-Support mailing list
> > > > Sim...@li...
> > > >
> >
> https://lists.sourceforge.net/lists/listinfo/simpleweb-support
> > > >
> > >
> >
> >
> >
> -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do
> > you grep through log files
> > for problems? Stop! Download the new AJAX search
> > engine that makes
> > searching your log files as easy as surfing the
> > web. DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dclick
> > _______________________________________________
> > Simpleweb-Support mailing list
> > Sim...@li...
> >
> https://lists.sourceforge.net/lists/listinfo/simpleweb-support
> >
>
> Niall Gallagher
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
> _______________________________________________
> Simpleweb-Support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simpleweb-support
>
|