Hi,

Yes, would be very interesting how you solved it, can you attach it as a
patch to the bug-entry?

Thanks... Dominik.

On Thu, Aug 23, 2018 at 11:18 PM, monnomiznog...@gmail.com <
monnomiznog...@gmail.com> wrote:

> Hi Dominik,
>
> I've already implemented a solution. I've modified 2 files
> StylesTable.java and XSSFCellBorder.java
>
> A simple solution really. If you're interested I could send you the
> modified files.
>
> FD
>
> On 2018/08/23 08:55:54, Dominik Stadler <dominik.stad...@gmx.at> wrote:
> > Yes, this is inefficient in some cases, this is already handled in
> > https://bz.apache.org/bugzilla/show_bug.cgi?id=54593 there were some
> > discussion about possible changes but unfortunately no full solution yet.
> >
> > Dominik.
> >
> > On Sat, Aug 18, 2018 at 10:22 PM monnomiznog...@gmail.com <
> > monnomiznog...@gmail.com> wrote:
> >
> > > Hi,
> > > A bit surprised by the inefficiency of some elements in XSSF.
> > >
> > > Take for example XSSFCellBorder.equals method:
> > >
> > >     public boolean equals(Object o) {
> > >         if (!(o instanceof XSSFCellBorder)) return false;
> > >
> > >         XSSFCellBorder cf = (XSSFCellBorder) o;
> > >         return border.toString().equals(cf.getCTBorder().toString());
> > >     }
> > >
> > > I created an .xlsx file with 12000+ cells, with borders. This means the
> > > library calls StylesTable.putBorder some 96000 times (12000 * 4 * 2,
> 12000
> > > cells, 4 borders, and 2 calls per border style + color)
> > >
> > > putBorder calls "indexOf" on the borders list, and so indexOf calls
> > > XSSFCellBorder.equals for every element in the borders list.
> > >
> > > The equals method tests 2 strings constructed from complex XML objects.
> > >
> > > Writing the file takes 3 minutes !
> > >
> > > With SmartXLS it takes less than 3 seconds.
> > >
> > > Do you think this behavior could be modified somehow ?
> > >
> > > Regards
> > > FD
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> > > For additional commands, e-mail: dev-h...@poi.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> For additional commands, e-mail: dev-h...@poi.apache.org
>
>

Reply via email to