Jump to content

Recommended Posts

Posted (edited)

i think can be done with many ways:

_list.remove(_list.indexOf(itemId));
_list.remove(Integer.valueOf(ItemId));
_list.remove(new Integer(itemId));

But the critical its to find the best performance.

Edited by StinkyMadness
Posted
15 minutes ago, Rootware said:

@Tryskell my example works correct. I get index first and after remove object from ArrayList by him index. What's wrong? All follows Eclipse documentation.

 

Until JIT does its work and saves the day, it's (probably) costier.

Posted
5 minutes ago, StinkyMadness said:

i think can be done with many ways:


_list.remove(_list.indexOf(itemId));
_list.remove(Integer.valueOf(ItemId));
_list.remove(new Integer(itemId));

But the critical its to find the best performance.

 

In your case not matter "best way", because too small list for feeling difference. Less few billions object in list pointless for catching performance.

Posted (edited)
19 minutes ago, Rootware said:

 

In your case not matter "best way", because too small list for feeling difference. Less few billions object in list pointless for catching performance.


Yes but is one list for each player... if all use it you better find best performance.
In other way already work with (Integer itemId)

Edited by StinkyMadness
Posted
10 minutes ago, Rootware said:

 

In your case not matter "best way", because too small list for feeling difference. Less few billions object in list pointless for catching performance.

 

remove(Integer.valueOf(

is the regular writing style, over L2J and aCis. End of story.

Posted (edited)
12 hours ago, StinkyMadness said:


Yes but is one list for each player... if all use it you better find best performance.
In other way already work with (Integer itemId)

 

If you cares about player instance, as multiplier can change performance, then cares about cleanup any customs from any this instance. By the way, everyone player's instance it's another thread and not matter how many time will be done list's operation. In your case this difference less 0,00001 second.

 

The general story line was in style of coding. :aproove-smile:

Edited by Rootware
  • Thanks 1
Posted
1 hour ago, Rootware said:

 

If you cares about player instance, as multiplier can change performance, then cares about cleanup any customs from any this instance. By the way, everyone player's instance it's another thread and not matter how many time will be done list's operation. In your case this difference less 0,00001 second.

 

The general story line was in style of coding. :aproove-smile:


i know player's instance its already kinda mess xD i'm just telling that there are 3 or more ways that are doing the same job.. i care to learn.. the best performance.. not only for this case...

Posted

I always felt like things like this have more of a place in the CommunityBoard, instead of the NpcHtml. You have more space and to add more things. Also previous/next pagination can get hectic without numbered pagination so I would add that.

 

In terms of the code the following can be optimized:

npc.getDropData().forEach(c -> list.add(c));
Collections.reverse(list);

You can iterate over the getDropData() enumerable in a reverse fashion in order to prevent the reverse call. You just add the objects in reverse before hand.

 

You can move "final int ITEMS_PER_LIST = 7;" outside of the static method to prevent the allocation to the object every time the method is called.

 

You should chain sb.append within your sb.append calls. Strings are immutable so you're allocating more memory for no reason.

 

You can change this:

 

if (_ignored.contains(itemId))
       _ignored.remove(itemId);
   else
       _ignored.add(itemId);

To this:

 

var existed = _ignored.remove(itemId);
if(!existed)
    _ignored.add(itemId);

 

You also should rename the public methods "ignoredDropContain" and "ignored" in Player.java. They are really bad names and they don't imply what they do. They also don't belong in the Player class.

 

There are other small things as well but too nit picky to mention.

  • Upvote 1
Posted (edited)

Hi, is this compatible with Interlude? Thanks! 

 

Never mind :), i successfully implemented it on my private server. The only question I have, what does the check boxes actually do? How do they work? Because i can't see any changes whatsoever.

Edited by stalker66
  • 3 weeks later...
  • 3 weeks later...
  • 1 month later...
  • 2 weeks later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • Gaining attention on Instagram today is more competitive than ever. Whether you're a content creator, entrepreneur, or influencer, building a loyal audience is essential—but often slow. That’s why many users turn to free Instagram followers to kickstart their growth and establish credibility early. With services like GoupSocial, you no longer have to wait months to build traction. By using tools such as instagram followers panel free and free smm panels, you can gain real followers and reach your goals faster. Why Free Instagram Followers Make a Difference Let’s face it—numbers matter. A higher follower count directly affects how others see your brand or profile. When people visit your account and see a big audience, they’re more likely to trust you, follow you, and engage with your content. Here’s how free Instagram followers impact your account: ✅ Boosted credibility: People associate large followings with trust and value. ✅ Greater reach: The Instagram algorithm favors high-engagement accounts. ✅ Brand appeal: Businesses want to collaborate with profiles that already have visibility. ✅ Faster momentum: Platforms like instagram free followers panel eliminate slow, organic-only growth paths. Add tools like free ig likes every 24 hours, and you're not just growing—you’re staying active and visible across the platform. Top Benefits of Using Free Instagram Followers 1. Gain Social Proof Instantly When visitors see a high follower count, it validates your profile. Tools like idigic Instagram followers allow you to generate this social proof fast—without compromising on quality. 2. Consistent Engagement With Likes and Views Pairing followers with tools like free ig likes every 24 hours ensures your content gets seen and interacted with. The algorithm loves engagement, and this keeps your posts fresh and prioritized. 3. Easier Entry Into Explore Page Profiles with high engagement have a better shot at being featured on trending pages. Platforms like igtools followers can help drive those early signals Instagram uses to recommend content. 4. Save Time While Looking Organic Building your presence takes time—unless you have help. With instagram free followers 100 real services, your account grows quickly and still looks natural, without spammy or fake-looking numbers. 5. Attract Collaborations With Brands Businesses look for influencers who can amplify their message. When your profile has strong numbers—boosted via instagram free followers like and free smm panels—you’re more likely to land partnerships and deals. Is It Safe to Get Free Instagram Followers? Yes, if done correctly. The key is using trusted sources. Some platforms fill your profile with bots, which can get your account flagged or banned. That’s why services like GoupSocial are essential—they deliver real, safe engagement through tools like instagram followers panel free. With idigic Instagram followers or igtools followers, the goal isn’t just more numbers—it’s smart, consistent growth that Instagram’s algorithm can respect. How to Use GoupSocial to Get Free Instagram Followers Getting started is simple: 🖊️ Enter your Instagram username 🎯 Choose the number of followers you want 🚀 Click "submit" and watch your count increase in real time Whether you want to test the waters with a few followers or boost engagement with free ig likes every 24 hours, GoupSocial has the tools to help. The Power of Using Growth Tools Strategically Gaining traction with free Instagram followers isn’t about cheating the system—it’s about working smarter. Using platforms that offer instagram free followers 100 real ensures you don’t just inflate numbers, but also increase your influence. Tools like instagram free followers like, free smm panels, and instagram followers panel free create a foundation of trust, engagement, and visibility. It’s the perfect launchpad for creators who want to focus on content—not on chasing every new follower manually. Start Strong, Grow Smarter Instagram success is no longer reserved for those with large budgets. With the right tools, anyone can build influence. Free Instagram followers from reputable services like GoupSocial help you achieve fast, safe, and impactful growth. Use features like free ig likes every 24 hours, explore tools like idigic Instagram followers, and make use of instagram free followers like strategies to grow with confidence. The power to scale is in your hands—start now and watch your audience thrive.
    • Buying & Selling FFXIV FFXI Horizon Eden and other server
    • Buying & Selling Torn City Cash
    • Added: payment method MidTrans - for Indonesia MercadoPago - for Brazil and etc.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock